Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultGrpcGatewayListenAddress = ":8081" DefaultGrpcGatewayForwardToAddress = "127.0.0.1:9091" DefaultGrpcGatewayMaxCallRecvMsgSizeMB = 0 DefaultGrpcGatewayMaxCallSendMsgSizeMB = 0 )
View Source
const DefaultGrpcCapacity = GrpcCapacityUnlimited
View Source
const DefaultGrpcListenAddress = ":9091"
View Source
const GrpcCapacityUnlimited = 0
Variables ¶
This section is empty.
Functions ¶
func DefaultMuxOptions ¶
func DefaultMuxOptions() []runtime.ServeMuxOption
func MuxOptionCustomErrorHandler ¶
func MuxOptionCustomErrorHandler() runtime.ServeMuxOption
func MuxOptionCustomMarshaler ¶
func MuxOptionCustomMarshaler() runtime.ServeMuxOption
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
func NewGateway ¶
func NewGateway(cfg *GrpcGatewayConfig, startupFunc GatewayStartupFunc, gwMuxOptions ...runtime.ServeMuxOption) *Gateway
NewGateway creates a new Grpc Gateway server
type GatewayStartupFunc ¶
type Grpc ¶
type Grpc struct {
// contains filtered or unexported fields
}
func NewGrpc ¶
func NewGrpc(cfg *GrpcConfig, opts ...grpc.ServerOption) *Grpc
NewGrpc creates a new Grpc server
func (*Grpc) Registrar ¶
func (s *Grpc) Registrar() grpc.ServiceRegistrar
type GrpcConfig ¶
type GrpcConfig struct { Listen string `mapstructure:"listen"` Capacity int `mapstructure:"capacity"` ReflectionEnabled bool `mapstructure:"reflection_enabled"` GrpcWeb *GrpcWebConfig `mapstructure:"grpc_web"` }
func DefaultGrpcConfig ¶
func DefaultGrpcConfig() *GrpcConfig
func (*GrpcConfig) Validate ¶
func (c *GrpcConfig) Validate() error
type GrpcGatewayConfig ¶
type GrpcGatewayConfig struct { Listen string `mapstructure:"listen"` ForwardTo string `mapstructure:"forward_to"` MaxCallRecvMsgSizeMB int `mapstructure:"max_call_recv_msg_size_mb"` MaxCallSendMsgSizeMB int `mapstructure:"max_call_send_msg_size_mb"` }
func DefaultGrpcGatewayConfig ¶
func DefaultGrpcGatewayConfig() *GrpcGatewayConfig
func (*GrpcGatewayConfig) Validate ¶
func (c *GrpcGatewayConfig) Validate() error
type GrpcWebConfig ¶
type GrpcWebConfig struct {
Listen string `mapstructure:"listen"`
}
func (*GrpcWebConfig) Validate ¶
func (c *GrpcWebConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.