Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainStreamServer ¶
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 ¶
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 ¶
func StdConfig ¶
func StdConfig(key string, optionFunc ...OptionFunc) *Config
type OptionFunc ¶
type OptionFunc func(*Config)
func WithServerOption ¶
func WithServerOption(opt ...grpc.ServerOption) OptionFunc
func WithStreamServerInterceptor ¶
func WithStreamServerInterceptor(interceptor ...grpc.StreamServerInterceptor) OptionFunc
func WithUnaryServerInterceptor ¶
func WithUnaryServerInterceptor(interceptor ...grpc.UnaryServerInterceptor) OptionFunc
func WithWrap ¶
func WithWrap(wrap Wrap) OptionFunc