agent

package
v17.1.0-rc8 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TrivyScanner = report.ScannerDetails{
	ID:   "starboard_trivy",
	Name: "Trivy (via Starboard Operator)",
	Vendor: report.Vendor{
		Name: "GitLab",
	},
}

Functions

This section is empty.

Types

type CronScheduler

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

CronScheduler can run tasks on a cron schedule, with cancellation.

func NewCronScheduler

func NewCronScheduler() *CronScheduler

func (*CronScheduler) Run

func (s *CronScheduler) Run(ctx context.Context)

func (*CronScheduler) Schedule

func (s *CronScheduler) Schedule(ctx context.Context, schedule cron.Schedule, job Job)

type Factory

type Factory struct{}

func (*Factory) IsProducingLeaderModules

func (f *Factory) IsProducingLeaderModules() bool

func (*Factory) Name

func (f *Factory) Name() string

func (*Factory) New

func (f *Factory) New(cfg *modagent.Config) (modagent.Module, error)

func (*Factory) StartStopPhase

func (f *Factory) StartStopPhase() modshared.ModuleStartStopPhase

type Job

type Job interface {
	// Run executes the cron task. It should cancel whatever it
	// is doing upon receiving a signal from ctx.Done.
	Run(context.Context)
}

type Payload

type Payload struct {
	Vulnerability *report.Vulnerability `json:"vulnerability"`
	Scanner       report.ScannerDetails `json:"scanner"`
}

Payload resembles the create-starboard-vulnerability payload of the KAS API https://docs.gitlab.com/ee/development/internal_api/#create-starboard-vulnerability

type Reporter

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

func NewReporter

func NewReporter(log *zap.Logger, api modagent.API) *Reporter

func (*Reporter) ResolveVulnerabilities

func (r *Reporter) ResolveVulnerabilities(ctx context.Context, uuids []string) (retError error)

func (*Reporter) Transmit

func (r *Reporter) Transmit(ctx context.Context, payloads []*Payload) ([]string, error)

type SecurityPolicyConfiguration

type SecurityPolicyConfiguration struct {
	Cadence    string    `json:"cadence"`
	Namespaces []string  `json:"namespaces"`
	UpdatedAt  time.Time `json:"updated_at"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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