Documentation ¶
Index ¶
- func WithForwardModifier(md GrpcForwardResponseModifier) forwardModifierConfigure
- func WithIncomingHeaderMatcher(fn IncomingHeaderMatcher) incomingHeaderMatcher
- func WithLogVerbose(v bool) *logVerboseConfigure
- func WithLogger(log logger.Logger) loggerConfigure
- func WithMarshaler(mime string, m runtime.Marshaler) marshalerOptionConfigure
- func WithMaxRecvMsgSize(size int) maxRecvMsgSize
- func WithMetadataModifier(md GrpcMetadataModifier) metadataModifierConfigure
- func WithMiddlewareConfigure(unaryMiddlewares []grpc.UnaryServerInterceptor, ...) middlewareConfigure
- func WithOutgoingHeaderMatcher(fn OutgoingHeaderMatcher) outgoingHeaderMatcher
- func WithTransportCredential(server, client credentials.TransportCredentials) transportCredentialConfigure
- type CustomizeMarshaler
- type GrpcForwardResponseModifier
- type GrpcMetadataModifier
- type IncomingHeaderMatcher
- type OutgoingHeaderMatcher
- type ServerService
- type ServiceConfig
- type ServiceConfigure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithForwardModifier ¶
func WithForwardModifier(md GrpcForwardResponseModifier) forwardModifierConfigure
func WithIncomingHeaderMatcher ¶
func WithIncomingHeaderMatcher(fn IncomingHeaderMatcher) incomingHeaderMatcher
func WithLogVerbose ¶
func WithLogVerbose(v bool) *logVerboseConfigure
func WithLogger ¶
func WithMarshaler ¶
func WithMaxRecvMsgSize ¶
func WithMaxRecvMsgSize(size int) maxRecvMsgSize
WithMaxRecvMsgSize allows server to received this such size while allows client to be able to receive this such as well. NOTE: there is no limit during send operation in both server/client
func WithMetadataModifier ¶
func WithMetadataModifier(md GrpcMetadataModifier) metadataModifierConfigure
func WithMiddlewareConfigure ¶
func WithMiddlewareConfigure(unaryMiddlewares []grpc.UnaryServerInterceptor, streamMiddlewares []grpc.StreamServerInterceptor) middlewareConfigure
func WithOutgoingHeaderMatcher ¶
func WithOutgoingHeaderMatcher(fn OutgoingHeaderMatcher) outgoingHeaderMatcher
func WithTransportCredential ¶
func WithTransportCredential(server, client credentials.TransportCredentials) transportCredentialConfigure
Types ¶
type CustomizeMarshaler ¶
type CustomizeMarshaler struct {
// contains filtered or unexported fields
}
type GrpcForwardResponseModifier ¶
GrpcForwardResponseModifier would be used to modify http.ResponseWriter before the forward process is started
type GrpcMetadataModifier ¶
GrpcMetadataModifier can be used to pass http.Requests into grpc context via metadata.MD
type IncomingHeaderMatcher ¶
type IncomingHeaderMatcher runtime.HeaderMatcherFunc
IncomingHeaderMatcher is used to convert grpc.header to http.header with whitelisted
type OutgoingHeaderMatcher ¶
type OutgoingHeaderMatcher runtime.HeaderMatcherFunc
OutgoingHeaderMatcher is used to convert http.header to grpc.metadata with whitelisted
type ServerService ¶
type ServerService struct {
// contains filtered or unexported fields
}
func NewServerService ¶
func NewServerService( grpcPort int, httpPort int, configures ...ServiceConfigure, ) (*ServerService, error)
func (*ServerService) AddGatewayRoutes ¶
func (s *ServerService) AddGatewayRoutes(routes ...*httpgateway.Route) error
func (*ServerService) RegisterService ¶
func (s *ServerService) RegisterService(sd *grpc.ServiceDesc, serviceImpl any, handlers ...httpgateway.GatewayHandlerFunc) error
func (*ServerService) Start ¶
func (s *ServerService) Start() error
func (*ServerService) Stop ¶
func (s *ServerService) Stop() error
type ServiceConfig ¶
type ServiceConfig struct {
// contains filtered or unexported fields
}
type ServiceConfigure ¶
type ServiceConfigure interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.