config

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config contains Node Agent configuration management

Index

Constants

View Source
const AccessToken = "access_token"
View Source
const HEARTBEAT_DEFAULT = 10
View Source
const HostCert = "host-cert.pem"
View Source
const HostKey = "host-key.pem"
View Source
const NodeAgentCert = "node-agent.pem"
View Source
const NodeAgentKey = "node-agent-key.pem"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigAuth

type ConfigAuth struct {
	AccessTokenURL  string   `yaml:"accessTokenURL"`
	RsTokenURL      string   `yaml:"rsTokenURL"`
	AccessTokenPath string   `yaml:"accessTokenPath"`
	ClientCredsPath string   `yaml:"clientCredsPath"`
	TokenClients    []string `yaml:"tokenClients"`
}

type ConfigOnboarding

type ConfigOnboarding struct {
	Enabled           bool          `yaml:"enabled"`
	ServiceURL        string        `yaml:"serviceURL"`
	HeartbeatInterval time.Duration `yaml:"heartbeatInterval"`
}

type ConfigStatus

type ConfigStatus struct {
	Endpoint              string            `yaml:"endpoint"`
	ServiceClients        []string          `yaml:"serviceClients"`
	OutboundClients       []string          `yaml:"outboundClients"`
	NetworkStatusInterval time.Duration     `yaml:"networkStatusInterval"`
	NetworkEndpoints      []NetworkEndpoint `yaml:"networkEndpoints"`
}

type NetworkEndpoint

type NetworkEndpoint struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
}

type NodeAgentConfig

type NodeAgentConfig struct {
	Version         string           `yaml:"version"`
	LogLevel        string           `yaml:"logLevel"`
	GUID            string           `yaml:"GUID"`
	Onboarding      ConfigOnboarding `yaml:"onboarding"`
	Auth            ConfigAuth       `yaml:"auth"`
	Status          ConfigStatus     `yaml:"status"`
	MetricsEndpoint string           `yaml:"metricsEndpoint"`
	MetricsInterval time.Duration    `yaml:"metricsInterval"`
}

func New

func New(cfgPath string) (*NodeAgentConfig, error)

Create a new Node agent configuration.

Jump to

Keyboard shortcuts

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