agent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Agents = &agentsMapper{
	sorted: &agents{
		agents: make([]*Agent, 0),
	},
}

agents storage in runtime

Functions

func SetActiveAgent

func SetActiveAgent(a *Agent)

SetActiveAgent sets active agent for which tasks are polling

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

agent information

func GetActiveAgent

func GetActiveAgent() *Agent

GetActiveAgent returns active agent for which tasks are polling

func (*Agent) GetArch

func (b *Agent) GetArch() shared.AgentArch

func (*Agent) GetCaps

func (b *Agent) GetCaps() uint32

func (*Agent) GetColor

func (b *Agent) GetColor() uint32

func (*Agent) GetDomain

func (b *Agent) GetDomain() string

func (*Agent) GetExtIp

func (b *Agent) GetExtIp() string

func (*Agent) GetFirst

func (b *Agent) GetFirst() time.Time

func (*Agent) GetHostname

func (b *Agent) GetHostname() string

func (*Agent) GetId

func (b *Agent) GetId() uint32

func (*Agent) GetIdHex

func (b *Agent) GetIdHex() string

func (*Agent) GetIntIp

func (b *Agent) GetIntIp() string

func (*Agent) GetIsPrivileged

func (b *Agent) GetIsPrivileged() bool

func (*Agent) GetJitter

func (b *Agent) GetJitter() uint8

func (*Agent) GetLast

func (b *Agent) GetLast() time.Time

func (*Agent) GetListenerId

func (b *Agent) GetListenerId() int64

func (*Agent) GetNote

func (b *Agent) GetNote() string

func (*Agent) GetOs

func (b *Agent) GetOs() shared.AgentOs

func (*Agent) GetOsMeta

func (b *Agent) GetOsMeta() string

func (*Agent) GetPid

func (b *Agent) GetPid() uint64

func (*Agent) GetProcessName

func (b *Agent) GetProcessName() string

func (*Agent) GetSleep

func (b *Agent) GetSleep() uint32

func (*Agent) GetUsername

func (b *Agent) GetUsername() string

func (*Agent) IsDead

func (b *Agent) IsDead(delta time.Duration) bool

IsDead returns true if agent delayed on 3 * (sleep + sleep * jitter)

func (*Agent) IsDelayed

func (b *Agent) IsDelayed(delta time.Duration) bool

IsDelayed returns true if agent delayed on sleep + sleep * jitter

func (*Agent) SetArch

func (b *Agent) SetArch(arch shared.AgentArch)

func (*Agent) SetCaps

func (b *Agent) SetCaps(caps uint32)

func (*Agent) SetColor

func (b *Agent) SetColor(color uint32)

func (*Agent) SetDomain

func (b *Agent) SetDomain(data string)

func (*Agent) SetExtIp

func (b *Agent) SetExtIp(data string)

func (*Agent) SetFirst

func (b *Agent) SetFirst(t time.Time)

func (*Agent) SetHostname

func (b *Agent) SetHostname(data string)

func (*Agent) SetId

func (b *Agent) SetId(id uint32)

func (*Agent) SetIntIp

func (b *Agent) SetIntIp(data string)

func (*Agent) SetIsPrivileged

func (b *Agent) SetIsPrivileged(flag bool)

func (*Agent) SetJitter

func (b *Agent) SetJitter(jitter uint8)

func (*Agent) SetLast

func (b *Agent) SetLast(t time.Time)

func (*Agent) SetListenerId

func (b *Agent) SetListenerId(id int64)

func (*Agent) SetNote

func (b *Agent) SetNote(data string)

func (*Agent) SetOs

func (b *Agent) SetOs(os shared.AgentOs)

func (*Agent) SetOsMeta

func (b *Agent) SetOsMeta(data string)

func (*Agent) SetPid

func (b *Agent) SetPid(pid uint64)

func (*Agent) SetProcessName

func (b *Agent) SetProcessName(data string)

func (*Agent) SetSleep

func (b *Agent) SetSleep(sleep uint32)

func (*Agent) SetUsername

func (b *Agent) SetUsername(data string)

Jump to

Keyboard shortcuts

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