agentconfig

package
v0.0.0-...-f0c808a Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package agentconfig stores and retrieves configuration settings for the OS Config agent.

Index

Constants

View Source
const (

	// InstanceMetadata is the compute metadata URL.
	InstanceMetadata = "http://metadata.google.internal/computeMetadata/v1/instance"
	// IdentityTokenPath is the instance identity token path.
	IdentityTokenPath = "instance/service-accounts/default/identity?audience=osconfig.googleapis.com&format=full"
	// ReportURL is the guest attributes endpoint.
	ReportURL = InstanceMetadata + "/guest-attributes"
)

Variables

This section is empty.

Functions

func AptRepoDir

func AptRepoDir() string

AptRepoDir is the location of the apt repo files.

func AptRepoFilePath

func AptRepoFilePath() string

AptRepoFilePath is the location where the apt repo file will be created.

func AptRepoFormat

func AptRepoFormat() string

AptRepoFormat is the format of the apt repo files.

func CacheDir

func CacheDir() string

CacheDir is the location of the cache directory.

func Capabilities

func Capabilities() []string

Capabilities returns the agents capabilities.

func Debug

func Debug() bool

Debug sets the debug log verbosity.

func DisableInventoryWrite

func DisableInventoryWrite() bool

DisableInventoryWrite returns true if the DisableInventoryWrite setting is set.

func DisableLocalLogging

func DisableLocalLogging() bool

DisableLocalLogging flag.

func FreeOSMemory

func FreeOSMemory() bool

FreeOSMemory returns true if the FreeOSMemory setting is set.

func GooGetRepoDir

func GooGetRepoDir() string

GooGetRepoDir is the location of the googet repo files.

func GooGetRepoFilePath

func GooGetRepoFilePath() string

GooGetRepoFilePath is the location where the googet repo file will be created.

func GooGetRepoFormat

func GooGetRepoFormat() string

GooGetRepoFormat is the format of the googet repo files.

func GuestPoliciesEnabled

func GuestPoliciesEnabled() bool

GuestPoliciesEnabled indicates whether GuestPolicies should be enabled.

func ID

func ID() string

ID is the instance id.

func IDToken

func IDToken() (string, error)

IDToken is the instance id token.

func Instance

func Instance() string

Instance is the URI of the instance the agent is running on.

func LogFeatures

func LogFeatures(ctx context.Context)

LogFeatures logs the osconfig feature status.

func Name

func Name() string

Name is the instance name.

func NumericProjectID

func NumericProjectID() int64

NumericProjectID is the numeric project ID of the instance.

func OSInventoryEnabled

func OSInventoryEnabled() bool

OSInventoryEnabled indicates whether OSInventory should be enabled.

func OldRestartFile

func OldRestartFile() string

OldRestartFile is the location of the restart required file.

func OldTaskStateFile

func OldTaskStateFile() string

OldTaskStateFile is the location of the task state file.

func ProjectID

func ProjectID() string

ProjectID is the project ID of the instance.

func RestartFile

func RestartFile() string

RestartFile is the location of the restart required file.

func SerialLogPort

func SerialLogPort() string

SerialLogPort is the serial port to log to.

func SetVersion

func SetVersion(v string)

SetVersion sets the agent version.

func Stdout

func Stdout() bool

Stdout flag.

func SvcEndpoint

func SvcEndpoint() string

SvcEndpoint is the OS Config service endpoint.

func SvcPollInterval

func SvcPollInterval() time.Duration

SvcPollInterval returns the frequency to poll the service.

func TaskNotificationEnabled

func TaskNotificationEnabled() bool

TaskNotificationEnabled indicates whether TaskNotification should be enabled.

func TaskStateFile

func TaskStateFile() string

TaskStateFile is the location of the task state file.

func UserAgent

func UserAgent() string

UserAgent for creating http/grpc clients.

func Version

func Version() string

Version is the agent version.

func WatchConfig

func WatchConfig(ctx context.Context) error

WatchConfig looks for changes in metadata keys. Upon receiving successful response, it create a new agent config.

func YumRepoDir

func YumRepoDir() string

YumRepoDir is the location of the yum repo files.

func YumRepoFilePath

func YumRepoFilePath() string

YumRepoFilePath is the location where the yum repo file will be created.

func YumRepoFormat

func YumRepoFormat() string

YumRepoFormat is the format of the yum repo files.

func Zone

func Zone() string

Zone is the zone the instance is running in.

func ZypperRepoDir

func ZypperRepoDir() string

ZypperRepoDir is the location of the zypper repo files.

func ZypperRepoFilePath

func ZypperRepoFilePath() string

ZypperRepoFilePath is the location where the zypper repo file will be created.

func ZypperRepoFormat

func ZypperRepoFormat() string

ZypperRepoFormat is the format of the zypper repo files.

Types

This section is empty.

Jump to

Keyboard shortcuts

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