Documentation ¶
Index ¶
- type Checker
- type Core
- type ICore
- type Server
- func (h *Server) Check(ctx context.Context, req *metrov1.StatusCheckResponse) (*metrov1.StatusCheckResponse, error)
- func (h *Server) LivenessCheck(ctx context.Context, _ *emptypb.Empty) (*metrov1.StatusCheckResponse, error)
- func (h *Server) ReadinessCheck(ctx context.Context, _ *emptypb.Empty) (*metrov1.StatusCheckResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker interface {
// contains filtered or unexported methods
}
Checker interface for health
func NewBrokerHealthChecker ¶
func NewBrokerHealthChecker(admin messagebroker.Admin) Checker
NewBrokerHealthChecker returns a broker health checker
func NewCacheHealthChecker ¶
NewCacheHealthChecker returns a cache health checker
func NewRegistryHealthChecker ¶
NewRegistryHealthChecker returns a registry health checker
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core holds business logic and/or orchestrator of other things in the package.
func (*Core) IsHealthy ¶
IsHealthy checks if the app has been marked unhealthy. If so it'll return false. Otherwise, it'll check the application health and return a boolean value based on the health check result.
func (*Core) MarkUnhealthy ¶
func (c *Core) MarkUnhealthy()
MarkUnhealthy marks the core as unhealthy. Any further health checks after marking unhealthy will fail.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server has methods implementing of server rpc.
func (*Server) Check ¶
func (h *Server) Check(ctx context.Context, req *metrov1.StatusCheckResponse) (*metrov1.StatusCheckResponse, error)
Check returns service's serving status.
func (*Server) LivenessCheck ¶
func (h *Server) LivenessCheck(ctx context.Context, _ *emptypb.Empty) (*metrov1.StatusCheckResponse, error)
LivenessCheck checks responsiveness of all the dependant resources that the service is using
func (*Server) ReadinessCheck ¶
func (h *Server) ReadinessCheck(ctx context.Context, _ *emptypb.Empty) (*metrov1.StatusCheckResponse, error)
ReadinessCheck checks only for the responsiveness of the service