agent

package
v0.0.0-...-9138fd9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Context, Cancel            = context.WithCancel(context.Background())
	ID                         = ""
	WorkingDirectory, _        = os.Getwd()
	Product             string = "elkeid-agent"
	Control                    = filepath.Join(WorkingDirectory, "elkeidctl")
	// from linker
	Version string
)

Functions

func SetAbnormal

func SetAbnormal(err string)

func SetRunning

func SetRunning()
func Sync() {
	mu.Lock()
	defer mu.Unlock()
	currentState = StateTypeSyncing
	abnormalErrs = []string{}
}

func State

func State() (string, string)

func Update

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

升级过程禁止被打断 不是并发安全的

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