health

package
v0.5.4-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthClientSet

type HealthClientSet interface {
	// rpc GetHealth(emptypb.Empty) returns (core.Health)
	GetHealth(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*corev1.Health, error)
}

type HealthStatusQuerier

type HealthStatusQuerier interface {
	GetHealthStatus(id string) *corev1.HealthStatus
}

type HealthStatusUpdater

type HealthStatusUpdater interface {
	StatusC() chan StatusUpdate
	HealthC() chan HealthUpdate
}

type HealthUpdate

type HealthUpdate struct {
	ID     string         `json:"id"`
	Health *corev1.Health `json:"health"`
}

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

func NewListener

func NewListener() *Listener

func (*Listener) HandleAgentConnection

func (l *Listener) HandleAgentConnection(ctx context.Context, clientset agent.ClientSet)

Implements gateway.ConnectionHandler

func (*Listener) HandleConnection

func (l *Listener) HandleConnection(ctx context.Context, clientset HealthClientSet)

func (*Listener) HealthC

func (l *Listener) HealthC() chan HealthUpdate

func (*Listener) StatusC

func (l *Listener) StatusC() chan StatusUpdate

type Monitor

type Monitor struct {
	MonitorOptions
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(opts ...MonitorOption) *Monitor

func (*Monitor) GetHealthStatus

func (m *Monitor) GetHealthStatus(id string) *corev1.HealthStatus

func (*Monitor) Run

func (m *Monitor) Run(ctx context.Context, updater HealthStatusUpdater)

type MonitorOption

type MonitorOption func(*MonitorOptions)

func WithLogger

func WithLogger(lg *zap.SugaredLogger) MonitorOption

type MonitorOptions

type MonitorOptions struct {
	// contains filtered or unexported fields
}

type StatusUpdate

type StatusUpdate struct {
	ID     string         `json:"id"`
	Status *corev1.Status `json:"status"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL