Documentation ¶
Index ¶
- type Config
- func (config *Config) Address() string
- func (config *Config) Build() *Server
- func (config *Config) WithHost(host string) *Config
- func (config *Config) WithName(name string) *Config
- func (config *Config) WithNetwork(network string) *Config
- func (config *Config) WithPort(port int) *Config
- func (config *Config) WithServerOption(options ...grpc.ServerOption) *Config
- func (config *Config) WithStreamInterceptor(intes ...grpc.StreamServerInterceptor) *Config
- func (config *Config) WithUnaryInterceptor(intes ...grpc.UnaryServerInterceptor) *Config
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string Port int Network string // Network network type, tcp4 by default Name string // contains filtered or unexported fields }
Config ...
func (*Config) WithNetwork ¶
WithNetwork ...
func (*Config) WithServerOption ¶
func (config *Config) WithServerOption(options ...grpc.ServerOption) *Config
WithServerOption inject server option to grpc server User should not inject interceptor option, which is recommend by WithStreamInterceptor and WithUnaryInterceptor
func (*Config) WithStreamInterceptor ¶
func (config *Config) WithStreamInterceptor(intes ...grpc.StreamServerInterceptor) *Config
WithStreamInterceptor inject stream interceptors to server option
func (*Config) WithUnaryInterceptor ¶
func (config *Config) WithUnaryInterceptor(intes ...grpc.UnaryServerInterceptor) *Config
WithUnaryInterceptor inject unary interceptors to server option
type Server ¶
Server ...
func (*Server) GracefulStop ¶
GracefulStop implements server.Server interface it will stop echo server gracefully
func (*Server) Info ¶
func (s *Server) Info() *server.ServiceInfo
Click to show internal directories.
Click to hide internal directories.