agentcommon

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: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvKeyAgentConfigDir     = "CONFIG_DIR"
	EnvKeyAgentPushEndpoint  = "PUSH_ENDPOINT"
	EnvKeyAPIBaseURL         = "API_BASE_URL"
	EnvKeyAPIAuthScope       = "API_AUTH_SCOPE"
	EnvKeyAcrImageRepository = "AZURE_ACR_IMAGE_REPOSITORY"
)

Variables

This section is empty.

Functions

func DockerPullImage

func DockerPullImage(ctx context.Context, imageRef string, creds azcore.TokenCredential, tenantID string) error

func EnrollCertificate

func EnrollCertificate(c context.Context,
	cryptoProvider cryptoprovider.CryptoProvider,
	client agentclient.ClientWithResponsesInterface,
	certPolicyID string,
	openFile func(*certmodels.Certificate) (*os.File, error),
	onBehalfOf bool) (*certmodels.Certificate, crypto.PrivateKey, error)

func GetDockerClient

func GetDockerClient() (*dockerclient.Client, error)

func ParseCertificateKeyPair

func ParseCertificateKeyPair(filename string) (cert *x509.Certificate, key crypto.PrivateKey, err error)

Types

type AgentEnv

type AgentEnv struct {
	common.EnvService
	// contains filtered or unexported fields
}

func NewAgentEnv

func NewAgentEnv(envService common.EnvService, mode AgentSlot) (env *AgentEnv, err error)

func (*AgentEnv) AgentClient

func (ae *AgentEnv) AgentClient() (*agentclient.ClientWithResponses, error)

func (*AgentEnv) AzSecretsClient

func (ae *AgentEnv) AzSecretsClient() (*azsecrets.Client, error)

func (*AgentEnv) CertCred

type AgentSlot

type AgentSlot string
const (
	AgentSlotPrimary   AgentSlot = "primary"
	AgentSlotSecondary AgentSlot = "secondary"

	LegacyAgentSlotPrimary   AgentSlot = "server"
	LegacyAgentSlotSecondary AgentSlot = "launcher"
)

Jump to

Keyboard shortcuts

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