Documentation
¶
Index ¶
Constants ¶
View Source
const RequestIdHeaderName = "x-request-id"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcConnection ¶
type GrpcConnection struct {
Host string
Port string
Secure bool
GrpcHandlers []func(context.Context, *runtime.ServeMux, *grpc.ClientConn) error
HttpHandlers map[string]http.Handler
}
func (*GrpcConnection) Address ¶
func (i *GrpcConnection) Address() string
type GrpcServer ¶
type GrpcServer struct {
Host string
Port string
RegisterServices func(server *grpc.Server)
PreRequest func(ctx context.Context, req any, info *grpc.UnaryServerInfo) (err error)
PostRequest func(ctx context.Context, req any, info *grpc.UnaryServerInfo) (err error)
}
func (*GrpcServer) Address ¶
func (s *GrpcServer) Address() string
func (*GrpcServer) Run ¶
func (s *GrpcServer) Run()
type HttpGateway ¶
type HttpGateway struct {
Host string
Port string
GrpcConnections map[string]GrpcConnection
HttpHandlers map[string]http.Handler
}
func (*HttpGateway) Address ¶
func (g *HttpGateway) Address() string
func (*HttpGateway) Run ¶
func (g *HttpGateway) Run(ctx context.Context)
Run starts a HTTP gateway that serves the gRPC server
Click to show internal directories.
Click to hide internal directories.