Documentation ¶
Overview ¶
Package memory is an in-memory repository for storing and managing Agent Jobs and associated Job tracking structures
Index ¶
- type Repository
- func (r *Repository) Add(job jobs2.Job, info jobs.Info)
- func (r *Repository) Clear(agentID uuid.UUID) error
- func (r *Repository) ClearAll() error
- func (r *Repository) GetAll() map[string]jobs.Info
- func (r *Repository) GetInfo(jobID string) (jobs.Info, error)
- func (r *Repository) GetJobs(agentID uuid.UUID) (jobs []jobs2.Job, err error)
- func (r *Repository) UpdateInfo(info jobs.Info) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository is the structure that implements the in-memory repository for interacting with Agent Jobs
func NewRepository ¶
func NewRepository() *Repository
NewRepository creates and returns a new in-memory repository for interacting with Agent Jobs
func (*Repository) Add ¶
func (r *Repository) Add(job jobs2.Job, info jobs.Info)
Add the Job and associated Info tracking structure to the repository
func (*Repository) Clear ¶
func (r *Repository) Clear(agentID uuid.UUID) error
Clear removes all Jobs that have not already been sent to the associated Agent
func (*Repository) ClearAll ¶
func (r *Repository) ClearAll() error
ClearAll removes all Jobs that have not already been sent for ALL Agents
func (*Repository) GetAll ¶
func (r *Repository) GetAll() map[string]jobs.Info
GetAll returns all Job Info tracking structures as map to be iterated over
func (*Repository) GetInfo ¶
func (r *Repository) GetInfo(jobID string) (jobs.Info, error)
GetInfo returns the Job Info tracking structure for the associate Job ID
func (*Repository) UpdateInfo ¶
func (r *Repository) UpdateInfo(info jobs.Info) error
UpdateInfo replaces the Job Info tracking structure with the one provided