manager

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: GPL-3.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DEFAULT_ACTIVIATION_WAIT_TIME   = 60  // 1 Minute
	DEFAULT_LIMIT_REACHED_WAIT_TIME = 600 // 10 Minutes
)
View Source
const (
	DAYS_TO_EXPIRATION = -30
)

Variables

This section is empty.

Functions

func DecodePEMCert

func DecodePEMCert(p []byte) *x509.Certificate

func GetMachineId

func GetMachineId() string

func Init

func Init()

If we are connected to the manager, we need to do config parsing once before we start this to ensure we have the most up to date configs - the manager sync will automatically update configs while it's running

func Register

func Register()

Do inital registration when the agent starts up... send basic data and if we need to get a certificate we do that now.

func RequestCert

func RequestCert(certFn, keyFn string) error

func Run

func Run(restart chan<- struct{})

Set up the manager connection

func SanatizeFilename

func SanatizeFilename(f string) string

func Sync

func Sync(s, c bool) bool

Types

type Cert

type Cert struct {
	Certificate string `json:"cert"`
	PrivateKey  string `json:"key"`
}

type CheckInStatus

type CheckInStatus struct {
	NeedsConfigUpdate  bool `json:"needsConfigUpdate"`
	NeedsSecretsUpdate bool `json:"needsSecretsUpdate"`
}

type ConfigsData

type ConfigsData struct {
	Configs map[string]string
	Senders string
	Plugins map[string]string
}

type HostInfo

type HostInfo struct {
	Hostname  string
	MachineId string
	OS        string
	Platform  string
}

type RegisterStatus

type RegisterStatus struct {
	Activated    bool `json:"activated"`
	LimitReached bool `json:"limitReached"`
}

Jump to

Keyboard shortcuts

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