Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGRPCServer ¶
func NewGRPCServer(p GRPCServerParams) error
func NewGateway ¶
func NewGateway(p GatewayParams) error
Types ¶
type GRPCConfig ¶
type GRPCServerInputResult ¶
type GRPCServerInputResult struct { fx.Out UnaryInterceptors []grpc.UnaryServerInterceptor `group:"grpc_unary_server_interceptor,flatten"` StreamInterceptors []grpc.StreamServerInterceptor `group:"grpc_stream_server_interceptor,flatten"` Services []RegisterFn `group:"service,flatten"` }
type GRPCServerParams ¶
type GRPCServerParams struct { fx.In Lifecycle fx.Lifecycle OnErrorCh chan error Log *zap.SugaredLogger GRPCConfig GRPCConfig UnaryInterceptors []grpc.UnaryServerInterceptor `group:"grpc_unary_server_interceptor"` StreamInterceptors []grpc.StreamServerInterceptor `group:"grpc_stream_server_interceptor"` Services []RegisterFn `group:"service"` }
type GatewayConfig ¶
type GatewayConfig struct { Enabled bool `json:"enabled" default:"true"` Addr string `json:"addr" default:":8080"` ReadTimeout time.Duration `json:"read_timeout" default:"30s"` WriteTimeout time.Duration `json:"write_timeout" default:"30s"` IdleTimeout time.Duration `json:"idle_timeout" default:"120s"` }
type GatewayInputResult ¶
type GatewayInputResult struct { fx.Out ServeMuxOptions []runtime.ServeMuxOption `group:"grpc_gateway_serve_mux_options,flatten"` }
type GatewayParams ¶
type GatewayParams struct { fx.In Lifecycle fx.Lifecycle OnErrorCh chan error Log *zap.SugaredLogger TracerProvider trace.TracerProvider GRPCConfig GRPCConfig GatewayConfig GatewayConfig Services []RegisterFn `group:"service"` ServeMuxOptions []runtime.ServeMuxOption `group:"grpc_gateway_serve_mux_options"` HTTPMiddleware []func(http.Handler) http.Handler `group:"http_middleware"` }
type HandlerRegisterFn ¶
type RegisterFn ¶
type RegisterFn func() (string, ServerRegisterFn, HandlerRegisterFn)
type ServerRegisterFn ¶
Click to show internal directories.
Click to hide internal directories.