agent

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package agent is the package that contains those implementations to obtain metadata in the specific node, any other component wants to get those data should import this package rather than get directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaAgent

type MetaAgent struct {
	sync.Mutex

	// those fetchers provide a dynamic way to collect meta info;
	// actually, those fetchers call be set by self-defined implementations
	pod.PodFetcher
	node.NodeFetcher
	metric.MetricsFetcher
	cnr.CNRFetcher
	cnc.CNCFetcher

	// machine info is fetched from once and stored in meta-server
	*machine.KatalystMachineInfo
	// contains filtered or unexported fields
}

MetaAgent contains all those implementations for metadata running in this agent.

func NewMetaAgent

func NewMetaAgent(conf *config.Configuration, clientSet *client.GenericClientSet, emitter metrics.MetricEmitter) (*MetaAgent, error)

NewMetaAgent returns the instance of MetaAgent.

func (*MetaAgent) Run

func (a *MetaAgent) Run(ctx context.Context)

func (*MetaAgent) SetCNRFetcher

func (a *MetaAgent) SetCNRFetcher(c cnr.CNRFetcher)

func (*MetaAgent) SetMetricFetcher

func (a *MetaAgent) SetMetricFetcher(m metric.MetricsFetcher)

func (*MetaAgent) SetNodeFetcher

func (a *MetaAgent) SetNodeFetcher(n node.NodeFetcher)

func (*MetaAgent) SetPodFetcher

func (a *MetaAgent) SetPodFetcher(p pod.PodFetcher)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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