Documentation ¶
Index ¶
- type Scanner
- func (s *Scanner) CreateChildJob(job *jobs.Job) (*jobs.Job, error)
- func (s *Scanner) GetDueJobs(nowTime time.Time) ([]*jobs.Job, error)
- func (s *Scanner) GetNodeUUID(ctx context.Context, sourceID string, region string, acctID string) (string, error)
- func (s *Scanner) IsJobDeleted(jobID string) (bool, error)
- func (s *Scanner) UpdateJobNodeCount(jobID string, nodeCount int) error
- func (s *Scanner) UpdateJobStatus(job_id string, newStatus string, startTime *time.Time, endTime *time.Time) error
- func (s *Scanner) UpdateNode(ctx context.Context, job *types.InspecJob, detectInfo *inspec.OSInfo) error
- func (s *Scanner) UpdateParentJobSchedule(jobId string, jobCount int32, recurrence string, ...) error
- func (s *Scanner) UpdateResult(ctx context.Context, job *types.InspecJob, output []byte, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scanner ¶
type Scanner struct { DB *pgdb.DB FireJailExecProfilePath string // contains filtered or unexported fields }
func New ¶
func New(managerClient manager.NodeManagerServiceClient, nodesClient nodes.NodesServiceClient, db *pgdb.DB, fireJailExecProfilePath string) *Scanner
func (*Scanner) GetNodeUUID ¶
func (*Scanner) UpdateJobNodeCount ¶
func (*Scanner) UpdateJobStatus ¶
func (*Scanner) UpdateNode ¶
func (*Scanner) UpdateParentJobSchedule ¶
func (s *Scanner) UpdateParentJobSchedule(jobId string, jobCount int32, recurrence string, lastScheduledTime *timestamp.Timestamp) error
UpdateParentJobSchedule updates recurrent(parent) jobs fields: status: "new" -> "scheduled" -> "completed" if no more runs are required based on the recurrent fields and job count job_count: how many child jobs have been created for this recurrent job scheduled_time: when is the next run due
Click to show internal directories.
Click to hide internal directories.