Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainStreamServer ¶ added in v1.0.0
func ChainStreamServer(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor
ChainStreamServer creates a single interceptor out of a chain of many interceptors.
Copy from grpc-ecosystem/go-grpc-middleware.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three. If you want to pass context between interceptors, use WrapServerStream.
func ChainUnaryServer ¶ added in v1.0.0
func ChainUnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
ChainUnaryServer creates a single interceptor out of a chain of many interceptors.
Copy from grpc-ecosystem/go-grpc-middleware.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three, and three will see context changes of one and two.
Types ¶
type Config ¶
type Config struct { Network string `config:"network" desc:"The network must be \"tcp\", \"tcp4\", \"tcp6\", \"unix\" or \"unixpacket\""` Addr string `config:"addr" desc:"format: host:port"` Reflection bool `config:"reflection" desc:"Enable server reflection service"` // contains filtered or unexported fields }
func DefaultConfig ¶ added in v1.0.0
func StdConfig ¶ added in v1.0.0
func StdConfig(key string, optionFunc ...OptionFunc) *Config
type OptionFunc ¶
type OptionFunc func(*Config)
func WithServerOption ¶
func WithServerOption(opt ...grpc.ServerOption) OptionFunc
func WithStreamServerInterceptor ¶ added in v1.0.0
func WithStreamServerInterceptor(interceptor ...grpc.StreamServerInterceptor) OptionFunc
func WithUnaryServerInterceptor ¶ added in v1.0.0
func WithUnaryServerInterceptor(interceptor ...grpc.UnaryServerInterceptor) OptionFunc