Documentation
¶
Index ¶
- Variables
- func UnaryClient(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption
- func UnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption
- type GrpcServer
- type Option
- func WithCtx(ctx context.Context) Option
- func WithGrpcOpts(option ...grpc.ServerOption) Option
- func WithHdlrWrappers(wrapper ...grpc.UnaryServerInterceptor) Option
- func WithListenAddr(addr string) Option
- func WithMode(mode string) Option
- func WithName(name string) Option
- func WithNamespace(namespace string) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultMaxMsgSize define maximum message size that server can send // or receive. Default value is 4MB. DefaultMaxMsgSize = 1024 * 1024 * 4 )
Functions ¶
func UnaryClient ¶
func UnaryClient(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption
func UnaryServer ¶
func UnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption
Types ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
func NewGrpcServer ¶
func NewGrpcServer(options ...Option) *GrpcServer
func (*GrpcServer) RegistryStopFunc ¶
func (g *GrpcServer) RegistryStopFunc(f func())
func (*GrpcServer) Run ¶
func (g *GrpcServer) Run() error
func (*GrpcServer) Server ¶
func (g *GrpcServer) Server() grpc.ServiceRegistrar
func (*GrpcServer) WatchSignal ¶
func (g *GrpcServer) WatchSignal()
type Option ¶
type Option func(*Options)
func WithGrpcOpts ¶
func WithGrpcOpts(option ...grpc.ServerOption) Option
func WithHdlrWrappers ¶
func WithHdlrWrappers(wrapper ...grpc.UnaryServerInterceptor) Option
func WithListenAddr ¶
func WithNamespace ¶
Click to show internal directories.
Click to hide internal directories.