agentconfigmanager

package
v0.0.0-...-5004fd2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTLSDefaultConfig

func GetTLSDefaultConfig(configManager ConfigManager) (*tls.Config, error)

func NewConfigManager

func NewConfigManager(envSvc common.EnvService, slot agentcommon.AgentSlot) (*configManager, error)

func NewConfigManagerPollTaskExecutor

func NewConfigManagerPollTaskExecutor(cm *configManager) *pollTaskExecutor

func NewEchoTask

func NewEchoTask(buildID string,
	newEcho func(config *AgentEndpointConfiguration) (*echo.Echo, error),
	cm ConfigManager,
	endpoint string,
	mode agentcommon.AgentSlot) *echoTask

Types

type AgentEndpointConfiguration

type AgentEndpointConfiguration struct {
	VerifyJWKs        []cloudkey.JsonWebKey `json:"verifyJwks"`
	VerifyJwkID       string                `json:"verifyJwkId"`
	Version           string                `json:"version"`
	TLSCertificateID  string                `json:"tlsCertificateId"`
	AllowedImageRepos []string              `json:"allowedImageRepos"`
}

type ConfigDir

type ConfigDir string

func (ConfigDir) EnsureExist

func (dir ConfigDir) EnsureExist() error

func (ConfigDir) File

func (dir ConfigDir) File(filename string) string

func (ConfigDir) OpenFile

func (dir ConfigDir) OpenFile(filename string, flag int, fileMode os.FileMode) (*os.File, error)

type ConfigFile

type ConfigFile string

func (ConfigFile) Exists

func (f ConfigFile) Exists() (bool, error)

func (ConfigFile) LinkToAbsolutePath

func (f ConfigFile) LinkToAbsolutePath(targetAbsPath string) error

func (ConfigFile) ReadJSON

func (f ConfigFile) ReadJSON(v any) error

func (ConfigFile) WriteJSON

func (f ConfigFile) WriteJSON(v any) error

type ConfigManager

type ConfigManager interface {
	Client() agentclient.ClientWithResponsesInterface
	ConfigDir() RootConfigDir

	EnvConfig() *agentcommon.AgentEnv
	ConfigUpdate() <-chan *AgentEndpointConfiguration
	CryptoProvider() cryptoprovider.CryptoProvider
}

type ImmutableConfigObjectsDir

type ImmutableConfigObjectsDir struct {
	ConfigDir
}

type LeafConfigDir

type LeafConfigDir struct {
	ConfigDir
}

func (LeafConfigDir) ConfigFile

func (dir LeafConfigDir) ConfigFile(name WellKnownConfigFile) ConfigFile

type RootConfigDir

type RootConfigDir struct {
	ConfigDir
}

func (RootConfigDir) Active

func (RootConfigDir) Certs

func (RootConfigDir) JWKs

func (RootConfigDir) Versioned

func (dir RootConfigDir) Versioned(name agentmodels.AgentConfigName, version string) LeafConfigDir

type WellKnownConfigFile

type WellKnownConfigFile string

Jump to

Keyboard shortcuts

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