Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckModule ¶
type HealthCheckModule struct{}
HealthCheckModule defines a grpc provider for container.Container.
func (HealthCheckModule) ProvideGRPC ¶
func (h HealthCheckModule) ProvideGRPC(server *grpc.Server)
ProvideGRPC implements container.GRPCProvider
type MetricsModule ¶
type MetricsModule struct{}
MetricsModule exposes prometheus metrics. Here only provides a simple call, more complex use, please refer to github.com/grpc-ecosystem/go-grpc-prometheus.
Need to actively provide grpc.Server:
opts := []grpc.ServerOption{ grpc.UnaryInterceptor(grpc_prometheus.UnaryServerInterceptor), grpc.StreamInterceptor(grpc_prometheus.StreamServerInterceptor), } server = grpc.NewServer(opts...)
func (MetricsModule) ProvideGRPC ¶
func (m MetricsModule) ProvideGRPC(server *grpc.Server)
ProvideGRPC implements container.GRPCProvider
Click to show internal directories.
Click to hide internal directories.