Documentation ¶
Overview ¶
Package server defines the Options of server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOptions ¶
ApplyOptions applies the given options.
func DefaultSysExitSignal ¶ added in v0.1.0
func DefaultSysExitSignal() <-chan error
func SysExitSignal ¶ added in v0.1.0
Types ¶
type Config ¶
type Config struct { Address net.Addr // Duration that server waits for to allow any existing connection to be closed gracefully. ExitWaitTime time.Duration // Duration that server waits for after error occurs during connection accepting. AcceptFailedDelayTime time.Duration // Duration that the accepted connection waits for to read or write data, only works under NIO. MaxConnectionIdleTime time.Duration }
Config contains some server-side configuration.
type Options ¶
type Options struct { Svr *rpcinfo.EndpointBasicInfo Configs rpcinfo.RPCConfig LockBits int Once *configutil.OptionOnce MetaHandlers []remote.MetaHandler RemoteOpt *remote.ServerOption ErrHandle func(error) error ExitSignal func() <-chan error Proxy proxy.ReverseProxy // Registry is used for service registry. Registry registry.Registry // RegistryInfo is used to in registry. RegistryInfo *registry.Info ACLRules []acl.RejectFunc Limits *limit.Option LimitReporter limiter.LimitReporter MWBs []endpoint.MiddlewareBuilder Bus event.Bus Events event.Queue // DebugInfo should only contain objects that are suitable for json serialization. DebugInfo utils.Slice DebugService diagnosis.Service // Observability TracerCtl *internal_stats.Controller StatsLevel *stats.Level }
Options is used to initialize the server.
Click to show internal directories.
Click to hide internal directories.