agent

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 14, 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 AgentConfig

type AgentConfig struct {
	ClusterName     string `mapstructure:"clusterName"`
	TimeIntervalSec uint   `mapstructure:"timeIntervalSec"`
	Source          Source `mapstructure:"source"`
	LogLevel        int    `mapstructure:"logLevel"`
}

func CloneWithSerialization

func CloneWithSerialization(orig *AgentConfig) (*AgentConfig, error)

CloneWithSerialization uses encoding and decoding with json as a mechanism for performing a DeepCopy of the AgentConfig

type AgentSyncer

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

func NewAgentSyncer

func NewAgentSyncer(numaLogger *logger.NumaLogger) *AgentSyncer

func (*AgentSyncer) Run

func (syncer *AgentSyncer) Run(ctx context.Context)

Run function runs in a loop, syncing the manifest if it's changed, checking every x seconds It responds to all of the following events: 1. Config change; 2. Source Manifest change; 3. If file generator is used, then a change from that file

type ConfigManager

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

func GetConfigManagerInstance

func GetConfigManagerInstance() *ConfigManager

GetConfigManagerInstance returns a singleton config manager throughout the Agent application

func (*ConfigManager) GetConfig

func (cm *ConfigManager) GetConfig() (AgentConfig, int, error)

func (*ConfigManager) GetRevisionIndex

func (cm *ConfigManager) GetRevisionIndex() int

func (*ConfigManager) LoadConfig

func (cm *ConfigManager) LoadConfig(onErrorReloading func(error), configPath, configFileName, configFileType string) error

type KVGenerator

type KVGenerator struct {
	Embedded *apiv1.SingleClusterGenerator `mapstructure:"embedded,omitempty"`

	Reference *apiv1.MultiClusterFileGenerator `mapstructure:"reference,omitempty"`
}

type Source

type Source struct {
	// optional, apply to GitDefinition
	KeyValueGenerator *KVGenerator `mapstructure:"keyValueGenerator,omitempty"`

	GitDefinition apiv1.CredentialedGitSource `mapstructure:"gitDefinition"`
}

Jump to

Keyboard shortcuts

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