server

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateListen added in v0.8.2

func CreateListen(hp string, o *Opts) (net.Listener, error)

func PrintProto added in v0.8.2

func PrintProto(a []byte)

Types

type Args added in v0.8.0

type Args []string

func GetArgs added in v0.8.0

func GetArgs() Args

func (Args) GetFlag added in v0.8.2

func (a Args) GetFlag(v string) string

func (Args) IndexOfFlag added in v0.8.2

func (a Args) IndexOfFlag(v string) int

type AssetsServer added in v0.8.0

type AssetsServer struct {
	*Opts
	// contains filtered or unexported fields
}

func NewAssetsServer added in v0.8.0

func NewAssetsServer(conf *Opts) (*AssetsServer, error)

func (*AssetsServer) Shutdown added in v0.8.0

func (s *AssetsServer) Shutdown()

func (*AssetsServer) Start added in v0.8.0

func (s *AssetsServer) Start() error

type NatsServer added in v0.6.0

type NatsServer struct {
	*Opts
	// contains filtered or unexported fields
}

func NewNatsServer added in v0.6.0

func NewNatsServer(o *Opts) (*NatsServer, error)

func (*NatsServer) GetURL added in v0.6.0

func (s *NatsServer) GetURL() string

func (*NatsServer) HostPort added in v0.6.0

func (s *NatsServer) HostPort() string

func (*NatsServer) Shutdown added in v0.6.0

func (s *NatsServer) Shutdown()

func (*NatsServer) Start added in v0.6.0

func (s *NatsServer) Start() error

type Opts added in v0.8.0

type Opts struct {
	CaFile             string
	CertFile           string
	Debug              bool
	Dir                string
	KeyFile            string
	Logger             *logger.Logger
	PidDir             string
	Port               int
	RemoteNatsHostPort string
	NatsHostPort       string
	TextFrames         bool
	Trace              bool
	WSHostPort         string
}

func DefaultOpts added in v0.8.0

func DefaultOpts() Opts

func LoadOpts added in v0.8.0

func LoadOpts(fp string) (*Opts, error)

func ParseOpts added in v0.8.0

func ParseOpts(c string) (*Opts, error)

type ProxyWorker

type ProxyWorker struct {
	// contains filtered or unexported fields
}

func NewProxyWorker

func NewProxyWorker(id uint64, ws *websocket.Conn, natsHostPort string, server *WsServer) (*ProxyWorker, error)

func (*ProxyWorker) Serve

func (pw *ProxyWorker) Serve()

type WsServer added in v0.6.0

type WsServer struct {
	*Opts
	// contains filtered or unexported fields
}

func NewWsServer added in v0.6.0

func NewWsServer(opts *Opts) (*WsServer, error)

func (*WsServer) GetURL added in v0.6.0

func (s *WsServer) GetURL() string

func (*WsServer) Shutdown added in v0.6.0

func (s *WsServer) Shutdown()

func (*WsServer) Start added in v0.6.0

func (s *WsServer) Start() error

Jump to

Keyboard shortcuts

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