config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Address string `mapstructure:"address"`
	Token   string `mapstructure:"token"`
}

APIConfig represents the configuration for the API connection

type BackendCommons

type BackendCommons struct {
	Otel struct {
		Host        string            `mapstructure:"host"`
		Port        int               `mapstructure:"port"`
		AgentLabels map[string]string `mapstructure:"agent_labels"`
	} `mapstructure:"otel"`
	Diode struct {
		Target    string `mapstructure:"target"`
		APIKey    string `mapstructure:"api_key"`
		AgentName string `mapstructure:"agent_name"`
	}
}

BackendCommons represents common configuration for backends

type CloudManager added in v1.2.0

type CloudManager struct {
	Config struct {
		AgentName     string `mapstructure:"agent_name"`
		AutoProvision bool   `mapstructure:"auto_provision"`
	} `mapstructure:"config"`
	API  APIConfig  `mapstructure:"api"`
	MQTT MQTTConfig `mapstructure:"mqtt"`
	TLS  struct {
		Verify bool `mapstructure:"verify"`
	} `mapstructure:"tls"`
	DB struct {
		File string `mapstructure:"file"`
	} `mapstructure:"db"`
	Labels map[string]string `mapstructure:"labels"`
}

CloudManager represents the cloud ConfigManager configuration

type Config

type Config struct {
	Version  float64  `mapstructure:"version"`
	OrbAgent OrbAgent `mapstructure:"orb"`
}

Config represents the overall configuration

type ContextKey added in v1.0.1

type ContextKey string

ContextKey represents the key for the context

type GitManager added in v1.2.0

type GitManager struct {
	URL        string  `mapstructure:"url"`
	Branch     string  `mapstructure:"branch"`
	Auth       string  `mapstructure:"auth"`
	Schedule   *string `mapstructure:"schedule, omitempty"`
	Username   string  `mapstructure:"username"`
	Password   string  `mapstructure:"password"`
	PrivateKey string  `mapstructure:"private_key"`
}

GitManager represents the Git ConfigManager configuration.

type LocalManager added in v1.2.0

type LocalManager struct {
	Config string `mapstructure:"config"`
}

LocalManager represents the local ConfigManager configuration.

type MQTTConfig

type MQTTConfig struct {
	Connect   bool   `mapstructure:"connect"`
	Address   string `mapstructure:"address"`
	ID        string `mapstructure:"id"`
	Key       string `mapstructure:"key"`
	ChannelID string `mapstructure:"channel_id"`
}

MQTTConfig represents the configuration for the MQTT connection

type ManagerConfig

type ManagerConfig struct {
	Active  string         `mapstructure:"active"`
	Sources ManagerSources `mapstructure:"sources"`
}

ManagerConfig represents the configuration for the Config Manager

type ManagerSources added in v1.2.0

type ManagerSources struct {
	Cloud CloudManager `mapstructure:"orbcloud"`
	Local LocalManager `mapstructure:"local"`
	Git   GitManager   `mapstructure:"git"`
}

ManagerSources represents the configuration for manager sources, including cloud, local and git.

type OrbAgent

type OrbAgent struct {
	Backends      map[string]map[string]interface{} `mapstructure:"backends"`
	Policies      map[string]map[string]interface{} `mapstructure:"policies"`
	Labels        map[string]string                 `mapstructure:"labels"`
	ConfigManager ManagerConfig                     `mapstructure:"config_manager"`
	Debug         struct {
		Enable bool `mapstructure:"enable"`
	} `mapstructure:"debug"`
	ConfigFile string `mapstructure:"config_file"`
}

OrbAgent represents the configuration for the Orb agent

type PolicyPayload added in v1.2.0

type PolicyPayload struct {
	Action       string      `json:"action"`
	ID           string      `json:"id"`
	DatasetID    string      `json:"dataset_id"`
	AgentGroupID string      `json:"agent_group_id"`
	Name         string      `json:"name"`
	Backend      string      `json:"backend"`
	Format       string      `json:"format"`
	Version      int32       `json:"version"`
	Data         interface{} `json:"data"`
}

PolicyPayload represents the payload for the agent policy

Jump to

Keyboard shortcuts

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