Documentation ¶
Index ¶
Constants ¶
View Source
const (
PluginsRoot = root + ".plugins"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeepAliveOtions ¶
type KeepAliveOtions struct { Time time.Duration // Ping interval in seconds Timeout time.Duration // Timeout for a ping response in seconds MaxConnectionIdle time.Duration // Max idle time in seconds before closing the connection MaxConnectionAge time.Duration // Max connection age in seconds before closing MaxConnectionAgeGrace time.Duration // Grace period in seconds before forcing connection closure }
type Options ¶
type Options struct { Port int MaxConcurrentStreams int64 InitialWindowSize int32 InitialConnWindowSize int32 TLS TLSOptions `config:"tls"` KeepAlive KeepAliveOtions }
Options grpc server options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
type Plugin ¶
type Plugin func(ctx context.Context) []grpc.ServerOption
Plugin defines a grpc server Plugin function to execute.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a grpc server.
func NewServerWithConfigPath ¶
NewServerWithConfigPath returns a new grpc server with options from config path.
func NewServerWithOptions ¶
NewServerWithOptions returns a new grpc server with options.
func (*Server) ServiceRegistrar ¶
func (s *Server) ServiceRegistrar() grpc.ServiceRegistrar
ServiceRegistrar returns grpc service register.
type TLSAutoOptions ¶
type TLSAutoOptions struct {
Host string
}
type TLSFileOptions ¶
type TLSOptions ¶
type TLSOptions struct { Enabled bool Type string Auto TLSAutoOptions File TLSFileOptions }
Click to show internal directories.
Click to hide internal directories.