Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
GRPCServer controll grpc server start/stop process
type GRPCServerOption ¶ added in v1.0.0
type GRPCServerOption func(*GRPCServer)
GRPCServerOption allows redefine default grpc server settings
func GRPCSkipErrors ¶ added in v1.0.0
func GRPCSkipErrors(skip bool) GRPCServerOption
GRPCSkipErrors sets silent mode for Start/Stop grpc server, skip all errors
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer wrapper of http.Server
type HTTPServerOption ¶ added in v1.0.0
type HTTPServerOption func(*HTTPServer)
HTTPServerOption allows configure http server optional settings
func HTTPShutdownTimeout ¶ added in v1.0.0
func HTTPShutdownTimeout(timeout time.Duration) HTTPServerOption
HTTPShutdownTimeout sets shutdown timeout
func HTTPSkipErrors ¶ added in v1.0.0
func HTTPSkipErrors(skip bool) HTTPServerOption
HTTPSkipErrors sets skip errors flag
type MultiServer ¶
type MultiServer struct {
// contains filtered or unexported fields
}
MultiServer is servers aggregator
func (*MultiServer) Start ¶
func (ms *MultiServer) Start() error
Start calls Start function for each server in group, returns first error when happen
func (*MultiServer) Stop ¶
func (ms *MultiServer) Stop() error
Stop multiple servers and returns multierrr
type RadiusOption ¶ added in v1.0.0
type RadiusOption func(*RadiusServer)
RadiusOption allows redefine default settings
func RadiusShutdownTimeout ¶ added in v1.0.0
func RadiusShutdownTimeout(timeout time.Duration) RadiusOption
RadiusShutdownTimeout sets server shutdown timout, timeout should be great then zero
func RadiusSkipErrors ¶ added in v1.0.0
func RadiusSkipErrors(skip bool) RadiusOption
RadiusSkipErrors sets skip errors flag
type RadiusServer ¶ added in v1.0.0
type RadiusServer struct {
// contains filtered or unexported fields
}
RadiusServer wraps github.com/layeh/radius packet server
func (*RadiusServer) Start ¶ added in v1.0.0
func (s *RadiusServer) Start() error
Start radius server
type Server ¶
Server interface
func NewGRPCServer ¶
func NewGRPCServer(addr string, server *grpc.Server, opts ...GRPCServerOption) Server
NewGRPCServer returns grpc server wrapper
func NewHTTPServer ¶
func NewHTTPServer(s *http.Server, opts ...HTTPServerOption) Server
NewHTTPServer returns new http.Server wrapper
func NewRadiusServer ¶ added in v1.0.0
func NewRadiusServer(s *radius.PacketServer, opts ...RadiusOption) (Server, error)
NewRadiusServer return server