server

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2014 License: Apache-2.0 Imports: 19 Imported by: 0

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

func (server *Server) ListenAndServe() error

type ServerConfig added in v1.6.0

type ServerConfig struct {
	Country        string // 2 letter country code
	Portmap        int
	AdvertisedHost string // FQDN that is guaranteed to hit this server
	WaddellAddr    string // Address at which to connect to waddell for signaling
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL