agentcore

package
v0.2.0-beta-8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAgentConfigFile = "agent.yaml"
)

Variables

This section is empty.

Functions

func ApplyRuntimeOverrides

func ApplyRuntimeOverrides(cfg *Config, rt *bridgeproto.AgentRuntimeConfig) (restart bool, reconnect bool)

ApplyRuntimeOverrides mutates the config with runtime values and reports whether restart/reconnect are needed.

func MarkRuntimeProvenance

func MarkRuntimeProvenance(eff *EffectiveConfig, rt *bridgeproto.AgentRuntimeConfig)

MarkRuntimeProvenance marks runtime-managed fields as remote in provenance map.

func Save

func Save(path string, cfg *Config) error

Save writes the provided config to the given path as YAML.

Types

type Config

type Config struct {
	ServerURL          string          `mapstructure:"serverURL" yaml:"serverURL"`
	ClientID           string          `mapstructure:"clientID" yaml:"clientID"`
	ClientSecret       string          `mapstructure:"clientSecret" yaml:"clientSecret"`
	TenantID           string          `mapstructure:"tenantID" yaml:"tenantID"`
	AutoConnectOnStart bool            `mapstructure:"autoConnectOnStart" yaml:"autoConnectOnStart"`
	DIS                types.DISConfig `mapstructure:"dis" yaml:"dis"`
	TLS                struct {
		Enabled            bool `mapstructure:"enabled" yaml:"enabled"`
		InsecureSkipVerify bool `mapstructure:"insecureSkipVerify" yaml:"insecureSkipVerify"`
	} `mapstructure:"tls" yaml:"tls"`
	Control     ControlConfig           `mapstructure:"control" yaml:"control"`
	AppliedLoki *bridgeproto.LokiConfig `mapstructure:"-" yaml:"-"`
}

Config is the shared agent configuration (local + effective).

func Load

func Load(path string) (*Config, error)

Load reads config file + env overrides and returns a Config.

type ControlConfig

type ControlConfig struct {
	Enabled bool   `mapstructure:"enabled" yaml:"enabled"`
	Addr    string `mapstructure:"addr" yaml:"addr"`
	Token   string `mapstructure:"token" yaml:"token"`
}

ControlConfig governs the local control API.

type EffectiveConfig

type EffectiveConfig struct {
	Config     *Config           `json:"config"`
	Provenance map[string]string `json:"provenance"`
}

EffectiveConfig pairs the config with provenance metadata.

func ToEffective

func ToEffective(cfg *Config) *EffectiveConfig

ToEffective wraps the config with provenance defaults (local) for API responses.

Jump to

Keyboard shortcuts

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