agent

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KiB
	MiB
	GiB
	TiB
)

Variables

View Source
var DefaultBanner = []byte{}/* 8831 elements not displayed */

Functions

func Install

func Install(dir ...string) error

func InteractiveInstall

func InteractiveInstall(spawnShell bool) error

func ListReleases

func ListReleases() []string

func Notify

func Notify(event string, dirs []string) error

func Recovery

func Recovery() error

func Reset

func Reset() error

func Run

func Run(opts ...Option) error

setup needs edgevpn and k3s installed locally (both k3s and k3s-agent systemd services).

func RunInstall

func RunInstall(options map[string]string) error

func Upgrade

func Upgrade(version, image string, force, debug bool) error

Types

type BrandingText

type BrandingText struct {
	InteractiveInstall string `yaml:"interactive-install"`
	Install            string `yaml:"install"`
	Reset              string `yaml:"reset"`
	Recovery           string `yaml:"recovery"`
}

type Config

type Config struct {
	Branding BrandingText `yaml:"branding"`
}

func LoadConfig

func LoadConfig(path ...string) (*Config, error)

type Option

type Option func(o *Options) error

Option is a generic option for the Agent.

var ForceAgent Option = func(o *Options) error {
	o.Force = true
	return nil
}

ForceAgent forces the agent to run.

var RestartAgent Option = func(o *Options) error {
	o.Restart = true
	return nil
}

RestartAgent makes the agent restart on error.

func WithAPI

func WithAPI(address string) Option

WithAPI sets the API address used to talk to EdgeVPN and co-ordinate node bootstrapping.

func WithDirectory

func WithDirectory(dirs ...string) Option

WithDirectory sets the Agent config directories.

type Options

type Options struct {
	APIAddress string
	Dir        []string
	Force      bool
	Restart    bool
}

Options yields the options for the running agent.

func (*Options) Apply

func (o *Options) Apply(opts ...Option) error

Apply applies option to the options struct.

Jump to

Keyboard shortcuts

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