scanestimationwatcher

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollInterval             = 5 * time.Second
	DefaultReconcileTimeout         = 2 * time.Minute
	DefaultScanEstimationTimeout    = 48 * time.Hour
	DefaultScanEstimationTTLSeconds = 7200 // // 2 hours
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Backend               *backendclient.BackendClient
	Provider              provider.Provider
	PollPeriod            time.Duration `mapstructure:"poll_period"`
	ReconcileTimeout      time.Duration `mapstructure:"reconcile_timeout"`
	ScanEstimationTimeout time.Duration `mapstructure:"estimation_timeout"`
}

func (Config) WithBackendClient

func (c Config) WithBackendClient(b *backendclient.BackendClient) Config

func (Config) WithProviderClient

func (c Config) WithProviderClient(p provider.Provider) Config

type ScanEstimationReconcileEvent

type ScanEstimationReconcileEvent struct {
	ScanEstimationID models.ScanEstimationID
}

func (ScanEstimationReconcileEvent) Hash

func (ScanEstimationReconcileEvent) String

func (ScanEstimationReconcileEvent) ToFields

type Watcher

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

func New

func New(c Config) *Watcher

func (*Watcher) GetScanEstimations

func (w *Watcher) GetScanEstimations(ctx context.Context) ([]ScanEstimationReconcileEvent, error)

func (*Watcher) Reconcile

func (w *Watcher) Reconcile(ctx context.Context, event ScanEstimationReconcileEvent) error

nolint:cyclop

func (*Watcher) Start

func (w *Watcher) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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