agent

package
v0.0.0-...-a16fe4d Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Agent state machine from Elkeid Add some trivial limitation

Index

Constants

View Source
const (
	HADES_HOME       = "/etc/hades/"
	HADES_PIDPATH    = "/var/run/"
	HADES_LOGHOME    = "/var/log/hades/"
	HADES_MACHINE_ID = HADES_HOME + "machine-id"
)
View Source
const (
	Product = "hades-agent"
)

Variables

View Source
var (
	Version         string // compile time added
	Context, Cancel = context.WithCancel(context.Background())
	Workdir, _      = os.Getwd()
	ID              string
)
View Source
var (
	Hostname    atomic.Value
	PrivateIPv4 atomic.Value
	PublicIPv4  atomic.Value
	PrivateIPv6 atomic.Value
	PublicIPv6  atomic.Value
)
View Source
var Controller = filepath.Join(HADES_HOME, "hadesctl")

Functions

func SetAbnormal

func SetAbnormal(err string)

func SetRunning

func SetRunning()

func State

func State() (string, string)

func Update

func Update(config proto.Config) (err error)

agent self-update Windows compatible is not invalid for now

Types

type StateType

type StateType int32
const (
	StateTypeRunning StateType = iota
	StateTypeAbnormal
)

func (StateType) String

func (x StateType) String() string

Jump to

Keyboard shortcuts

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