Documentation
¶
Index ¶
Constants ¶
View Source
const (
PortmapFailure = 50
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertContext ¶
type CertContext struct {
PKFile string
ServerCertFile string
PK *keyman.PrivateKey
ServerCert *keyman.Certificate
}
CertContext encapsulates the certificates used by a Server
func (*CertContext) InitServerCert ¶
func (ctx *CertContext) InitServerCert(host string) (err error)
InitServerCert initializes a PK + cert for use by a server proxy, signed by the CA certificate. We always generate a new certificate just in case.
type Server ¶
type Server struct {
// Addr: listen address in form of host:port
Addr string
// ReadTimeout: (optional) timeout for read ops
ReadTimeout time.Duration
// WriteTimeout: (optional) timeout for write ops
WriteTimeout time.Duration
CertContext *CertContext // context for certificate management
AllowNonGlobalDestinations bool // if true, requests to LAN, Loopback, etc. will be allowed
StatServer *statserver.Server // optional server of stats
// contains filtered or unexported fields
}
func (*Server) Configure ¶ added in v1.6.0
func (server *Server) Configure(newCfg *ServerConfig)
func (*Server) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.