Documentation ¶
Index ¶
- Variables
- type EchoForker
- type Fork
- func (f *Fork) ChildPids() []int
- func (f *Fork) GetEcho() *echo.Echo
- func (f *Fork) GetGrpcServer() *grpc.Server
- func (f *Fork) ListenAndServe(address string) error
- func (f *Fork) ListenAndServeTLS(address, certFile, keyFile string) error
- func (f *Fork) NumOfChild() int
- func (f *Fork) ServeGrpc(address string) error
- func (f *Fork) StartEcho(address string) error
- type Forker
- type GrpcForker
- type Network
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrReuseportOnWindows = errors.New("please enable reuseport for windows") ErrOverRecovery = errors.New("exceeding recovery child of forker") )
Functions ¶
This section is empty.
Types ¶
type EchoForker ¶ added in v1.1.0
type EchoForker interface { StartEcho(address string) error GetEcho() *echo.Echo // contains filtered or unexported methods }
func NewEchoForker ¶ added in v1.1.0
func NewEchoForker(opts ...Option) EchoForker
NewEchoForker create for listen and serve echo
type Fork ¶
type Fork struct { Network Network // Network is net type tcp4, tcp, tcp6, udp, udp4, udp6 ReusePort bool // ReusePort use for windows support child process base on system call // contains filtered or unexported fields }
func (*Fork) GetEcho ¶ added in v1.1.0
func (f *Fork) GetEcho() *echo.Echo
GetEcho return echo object
func (*Fork) GetGrpcServer ¶ added in v1.2.0
GetGrpcServer return grpc server object
func (*Fork) ListenAndServe ¶
ListenAndServe listen and serve http server
func (*Fork) ListenAndServeTLS ¶
ListenAndServeTLS listen and serve http server with tls support
type Forker ¶
type GrpcForker ¶ added in v1.2.0
type GrpcForker interface { ServeGrpc(address string) error GetGrpcServer() *grpc.Server // contains filtered or unexported methods }
func NewGrpcForker ¶ added in v1.2.0
func NewGrpcForker(grpcServerOpts []grpc.ServerOption, opts ...Option) GrpcForker
NewGrpcForker create for listen and serve grpc server
Source Files ¶
Click to show internal directories.
Click to hide internal directories.