registration

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstalledAgentID added in v0.2.10

func GetInstalledAgentID(agentTypeID string) (string, error)

func IsRegistered added in v0.2.9

func IsRegistered() bool

func RefreshRegistration added in v0.2.0

func RefreshRegistration(ctx context.Context) error

func SaveInstalledAgents added in v0.2.10

func SaveInstalledAgents(a Agents) error

func Start

func Start(ctx context.Context) error

Start the registration process.

func UpdateVersion added in v0.2.16

func UpdateVersion(ctx context.Context) error

Types

type AWSTags

type AWSTags struct {
	InstanceID       string `json:"instance_id,omitempty"`
	AccountID        string `json:"account_id,omitempty"`
	Architecture     string `json:"architecture,omitempty"`
	AvailabilityZone string `json:"availability_zone,omitempty"`
	ImageID          string `json:"image_id,omitempty"`
	InstanceType     string `json:"instance_type,omitempty"`
	KernelID         string `json:"kernel_id,omitempty"`
	PendingTime      string `json:"pending_time,omitempty"`
	PrivateIP        string `json:"private_ip,omitempty"`
	RamdiskID        string `json:"ramdisk_id,omitempty"`
	Region           string `json:"region,omitempty"`
	Version          string `json:"version,omitempty"`
}

type Agent

type Agent struct {
	AgentID     string `json:"agent_id"      yaml:"agent_id"`
	AgentTypeID string `json:"agent_type_id" yaml:"agent_type_id"`
}

type Agents added in v0.2.10

type Agents []Agent

func LoadInstalledAgents added in v0.2.10

func LoadInstalledAgents() (Agents, error)

type Data

type Data struct {
	AWSMeta AWSTags `json:"aws,omitempty"`
}

type Registration

type Registration struct {
	Version              string   `json:"version"`
	MachineID            string   `json:"machine_id"`
	Hostname             string   `json:"hostname"`
	OS                   string   `json:"os"`
	Platform             string   `json:"platform"`
	PlatformVersion      string   `json:"platform_version"`
	PlatformFamily       string   `json:"platform_family"`
	KernelArch           string   `json:"kernel_arch"`
	KernelVersion        string   `json:"kernel_version"`
	VirtualizationSystem string   `json:"virtualization_system"`
	VirtualizationRole   string   `json:"virtualization_role"`
	Data                 Data     `json:"data,omitempty"`
	Tags                 []string `json:"tags,omitempty"`
}

type Response

type Response struct {
	AuthToken    string `json:"access_token"  yaml:"access_token"`
	ManagerID    string `json:"manager_id"    yaml:"manager_id"`
	RefreshToken string `json:"refresh_token" yaml:"refresh_token"`
}

Jump to

Keyboard shortcuts

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