reporter

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCheckFunc

func RegisterCheckFunc(fn checkFunc)

RegisterCheckFunc should be used to registerIfNeed readyz check func

Types

type Reporter

type Reporter struct {
	// Cluster current cluster name
	Cluster string

	// IsMemberCluster indicate if current cluster is member cluster
	IsMemberCluster bool

	// IsWritable indicate if current cluster is writable
	IsWritable bool

	// PivotCubeHost the target warden to reporting
	PivotCubeHost string

	// PeriodSecond is interval time to reporting info
	PeriodSecond int

	// WaitSecond is readyz wait timeout
	WaitSecond int

	// LocalClusterKubeConfig is used for register cluster
	LocalClusterKubeConfig string

	// PivotClient used to connect to pivot cluster k8s-apiserver
	PivotClient multiclient.Client

	// http.Client used to reporting heartbeat
	*http.Client
	// contains filtered or unexported fields
}

Reporter reports local cluster info to pivot cluster scout

func (*Reporter) Initialize

func (r *Reporter) Initialize() error

func (*Reporter) Run

func (r *Reporter) Run(stop <-chan struct{})

Run of reporter will block the goroutine util received stop signal

Jump to

Keyboard shortcuts

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