agent

package
v0.0.0-...-551a65d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package agent implements the Compliance Agent entrypoint

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunChecks

func RunChecks(reporter event.Reporter, configDir string, options ...checks.BuilderOption) error

RunChecks runs checks right away without scheduling

func RunChecksFromFile

func RunChecksFromFile(reporter event.Reporter, file string, options ...checks.BuilderOption) error

RunChecksFromFile runs checks from the specified file with no scheduling

func WaitGetNodeLabels added in v0.9.0

func WaitGetNodeLabels() (map[string]string, error)

WaitGetNodeLabels waits for node labels to become available using a backoff retrier

Types

type Agent

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

Agent defines Compliance Agent

func New

func New(reporter event.Reporter, scheduler Scheduler, configDir string, options ...checks.BuilderOption) (*Agent, error)

New creates a new instance of Agent

func (*Agent) Run

func (a *Agent) Run() error

Run starts the Compliance Agent

func (*Agent) RunChecks

func (a *Agent) RunChecks() error

RunChecks runs checks with no scheduling

func (*Agent) RunChecksFromFile

func (a *Agent) RunChecksFromFile(file string) error

RunChecksFromFile runs checks from the specified file with no scheduling

func (*Agent) Stop

func (a *Agent) Stop()

Stop stops the Compliance Agent

type Scheduler

type Scheduler interface {
	Enter(check check.Check) error
	Cancel(id check.ID) error
	Run()
	Stop() error
	IsCheckScheduled(id check.ID) bool
}

Scheduler abstracts the collector.Scheduler interface

Jump to

Keyboard shortcuts

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