Documentation
¶
Index ¶
- type Checker
- type Config
- type ConnChecker
- type ConnCheckerOption
- type SrvMon
- func (m *SrvMon) AddDependencies(dependency ...Checker) *SrvMon
- func (m *SrvMon) Health(ctx context.Context, _ *pb.HealthRequest) (*pb.HealthResponse, error)
- func (m *SrvMon) Ready(ctx context.Context, _ *pb.ReadinessRequest) (resp *pb.ReadinessResponse, _ error)
- func (m *SrvMon) Run(ctx context.Context)
- func (m *SrvMon) SetReady()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnChecker ¶ added in v1.5.0
type ConnChecker struct {
// contains filtered or unexported fields
}
func NewConnChecker ¶ added in v1.5.0
func NewConnChecker(conn *grpc.ClientConn, name string, mustOK bool, opts ...ConnCheckerOption) *ConnChecker
func (*ConnChecker) Check ¶ added in v1.5.0
func (c *ConnChecker) Check(ctx context.Context) (*pb.CheckResult, error)
type ConnCheckerOption ¶ added in v1.7.0
type ConnCheckerOption func(*ConnChecker)
func WithService ¶ added in v1.7.0
func WithService(name string) ConnCheckerOption
WithService sets the service name passed to the gRPC Health check. Empty string checks the overall server health.
func WithTimeout ¶ added in v1.7.0
func WithTimeout(d time.Duration) ConnCheckerOption
WithTimeout sets the deadline for the health check RPC. Default: 3s.
type SrvMon ¶
type SrvMon struct {
pb.UnimplementedSrvmonServer
// contains filtered or unexported fields
}
func (*SrvMon) AddDependencies ¶
func (*SrvMon) Health ¶
func (m *SrvMon) Health(ctx context.Context, _ *pb.HealthRequest) (*pb.HealthResponse, error)
func (*SrvMon) Ready ¶
func (m *SrvMon) Ready(ctx context.Context, _ *pb.ReadinessRequest) (resp *pb.ReadinessResponse, _ error)
Click to show internal directories.
Click to hide internal directories.