Documentation ¶
Index ¶
- type Address
- type Config
- type Engine
- type HTTPServerConfig
- type HTTPServerMiddleware
- type Option
- func WithAddr(network, addr string) Option
- func WithDefaultLogger() Option
- func WithGatewayAddr(network, addr string) Option
- func WithGatewayDialOptions(opts ...grpc.DialOption) Option
- func WithGatewayMuxOptions(opts ...runtime.ServeMuxOption) Option
- func WithGatewayServerConfig(cfg *HTTPServerConfig) Option
- func WithGatewayServerMiddlewares(middlewares ...HTTPServerMiddleware) Option
- func WithGatewayServerStreamInterceptors(interceptors ...grpc.StreamClientInterceptor) Option
- func WithGatewayServerUnaryInterceptors(interceptors ...grpc.UnaryClientInterceptor) Option
- func WithGrpcAddr(network, addr string) Option
- func WithGrpcInternalAddr(network, addr string) Option
- func WithGrpcServerOptions(opts ...grpc.ServerOption) Option
- func WithGrpcServerStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) Option
- func WithGrpcServerUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) Option
- func WithPassedHeader(decider PassedHeaderDeciderFunc) Option
- func WithServers(svrs ...Server) Option
- type PassedHeaderDeciderFunc
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { GrpcAddr *Address GrpcInternalAddr *Address GatewayAddr *Address Servers []Server GrpcServerUnaryInterceptors []grpc.UnaryServerInterceptor GrpcServerStreamInterceptors []grpc.StreamServerInterceptor GatewayServerUnaryInterceptors []grpc.UnaryClientInterceptor GatewayServerStreamInterceptors []grpc.StreamClientInterceptor GrpcServerOption []grpc.ServerOption GatewayDialOption []grpc.DialOption GatewayMuxOptions []runtime.ServeMuxOption GatewayServerConfig *HTTPServerConfig MaxConcurrentStreams uint32 GatewayServerMiddlewares []HTTPServerMiddleware }
Config contains configurations of gRPC and Gateway server.
type HTTPServerConfig ¶ added in v0.3.0
type HTTPServerMiddleware ¶ added in v0.1.3
HTTPServerMiddleware is an interface of http server middleware
type Option ¶ added in v0.2.0
type Option func(*Config)
Option configures a gRPC and a gateway server.
func WithAddr ¶ added in v0.2.0
WithAddr returns an Option that sets an network address for a gRPC and a gateway server.
func WithDefaultLogger ¶ added in v0.2.0
func WithDefaultLogger() Option
WithDefaultLogger returns an Option that sets default grpclogger.LoggerV2 object.
func WithGatewayAddr ¶ added in v0.2.0
WithGatewayAddr returns an Option that sets an network address for a gateway server.
func WithGatewayDialOptions ¶ added in v0.2.0
func WithGatewayDialOptions(opts ...grpc.DialOption) Option
WithGatewayDialOptions returns an Option that sets grpc.DialOption(s) to a gRPC clinet used by a gateway server.
func WithGatewayMuxOptions ¶ added in v0.2.0
func WithGatewayMuxOptions(opts ...runtime.ServeMuxOption) Option
WithGatewayMuxOptions returns an Option that sets runtime.ServeMuxOption(s) to a gateway server.
func WithGatewayServerConfig ¶ added in v0.3.0
func WithGatewayServerConfig(cfg *HTTPServerConfig) Option
WithGatewayServerConfig returns an Option that specifies http.Server configuration to a gateway server.
func WithGatewayServerMiddlewares ¶ added in v0.2.0
func WithGatewayServerMiddlewares(middlewares ...HTTPServerMiddleware) Option
WithGatewayServerMiddlewares returns an Option that sets middleware(s) for http.Server to a gateway server.
func WithGatewayServerStreamInterceptors ¶ added in v0.2.0
func WithGatewayServerStreamInterceptors(interceptors ...grpc.StreamClientInterceptor) Option
WithGatewayServerStreamInterceptors returns an Option that sets stream interceptor(s) for a gRPC client used by a gateway server.
func WithGatewayServerUnaryInterceptors ¶ added in v0.2.0
func WithGatewayServerUnaryInterceptors(interceptors ...grpc.UnaryClientInterceptor) Option
WithGatewayServerUnaryInterceptors returns an Option that sets unary interceptor(s) for a gRPC client used by a gateway server.
func WithGrpcAddr ¶ added in v0.2.0
WithGrpcAddr returns an Option that sets an network address for a gRPC server.
func WithGrpcInternalAddr ¶ added in v0.2.0
WithGrpcInternalAddr returns an Option that sets an network address connected by a gateway server.
func WithGrpcServerOptions ¶ added in v0.2.0
func WithGrpcServerOptions(opts ...grpc.ServerOption) Option
WithGrpcServerOptions returns an Option that sets grpc.ServerOption(s) to a gRPC server.
func WithGrpcServerStreamInterceptors ¶ added in v0.2.0
func WithGrpcServerStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) Option
WithGrpcServerStreamInterceptors returns an Option that sets stream interceptor(s) for a gRPC server.
func WithGrpcServerUnaryInterceptors ¶ added in v0.2.0
func WithGrpcServerUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) Option
WithGrpcServerUnaryInterceptors returns an Option that sets unary interceptor(s) for a gRPC server.
func WithPassedHeader ¶ added in v0.2.0
func WithPassedHeader(decider PassedHeaderDeciderFunc) Option
WithPassedHeader returns an Option that sets configurations about passed headers for a gateway server.
func WithServers ¶ added in v0.2.0
WithServers returns an Option that sets gRPC service server implementation(s).
type PassedHeaderDeciderFunc ¶ added in v0.1.3
PassedHeaderDeciderFunc returns true if given header should be passed to gRPC server metadata.