scout

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scout

type Scout struct {
	// LastHeartbeat record last heartbeat form warden reporter
	LastHeartbeat time.Time

	// WaitTimeoutSeconds that heartbeat not receive timeout
	WaitTimeoutSeconds int

	// InitialDelaySeconds the time that wait for warden start
	InitialDelaySeconds int

	// Cluster the cluster where the warden watch for
	Cluster string

	// Receiver receive warden info form api
	Receiver chan WardenInfo

	// StopCh use to stop scout for
	StopCh chan struct{}

	// Once ensure scout for be called once
	Once *sync.Once
	// contains filtered or unexported fields
}

Scout collects information from warden

func NewScout

func NewScout(cluster string, initialDelay, waitTimeoutSeconds int, cli client.Client, stopCh chan struct{}) *Scout

func (*Scout) ClusterHealth

func (s *Scout) ClusterHealth() v1.ClusterState

func (*Scout) Collect

func (s *Scout) Collect(ctx context.Context)

Collect will scout a specified warden of cluster

type WardenInfo

type WardenInfo struct {
	// Cluster is cluster name the warden reported
	Cluster string `json:"cluster"`

	// ReportTime the time warden start to report
	ReportTime time.Time `json:"reportTime"`
}

WardenInfo contains intelligence within communication

Jump to

Keyboard shortcuts

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