Documentation ¶
Overview ¶
Package jobs holds the structures for Agent jobs
Index ¶
- type Info
- func (i *Info) Active()
- func (i *Info) AgentID() uuid.UUID
- func (i *Info) Cancel()
- func (i *Info) Command() string
- func (i *Info) Complete()
- func (i *Info) Completed() time.Time
- func (i *Info) Created() time.Time
- func (i *Info) ID() string
- func (i *Info) Send()
- func (i *Info) Sent() time.Time
- func (i *Info) Status() Status
- func (i *Info) StatusString() string
- func (i *Info) Token() uuid.UUID
- type Repository
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info is a structure for holding data for single task assigned to a single agent
func NewInfoWithID ¶ added in v2.1.2
func (*Info) StatusString ¶
StatusString returns the Job's status as a string
type Repository ¶
type Repository interface { // Add the Job and associated Info tracking structure to the repository Add(job jobs2.Job, info Info) // Clear removes all Jobs that have not already been sent to the associated Agent Clear(agentID uuid.UUID) error // ClearAll removes all Jobs that have not already been sent for ALL Agents ClearAll() error // GetAll returns all Job Info tracking structures as map to be iterated over GetAll() map[string]Info // GetInfo returns the Job Info tracking structure for the associate Job ID GetInfo(jobID string) (Info, error) // GetJobs returns all jobs waiting to be sent to the associated Agent GetJobs(agentID uuid.UUID) ([]jobs2.Job, error) // UpdateInfo replaces the Job Info tracking structure with the one provided UpdateInfo(info Info) error }
type Status ¶
type Status int
const ( UNDEFINED Status = iota // CREATED is used to denote that job has been created CREATED // SENT is used to denote that the job has been sent to the Agent SENT // RETURNED is for when a chunk has been returned but the job hasn't finished running RETURNED // COMPLETE is used to denote that the job has finished running and the Agent has sent back the results COMPLETE // CANCELED is used to denoted jobs that were cancelled with the "clear" command CANCELED // ACTIVE is used with SOCKS connections to show the connection between the SOCKS client and server is active ACTIVE )
Click to show internal directories.
Click to hide internal directories.