assetscanestimationwatcher

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollInterval                  = 5 * time.Second
	DefaultReconcileTimeout              = 15 * time.Second
	DefaultAbortTimeout                  = 1 * time.Minute
	DefaultAssetScanEstimationTTLSeconds = 7200 // 2 hours
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetScanEstimationReconcileEvent

type AssetScanEstimationReconcileEvent struct {
	AssetScanEstimationID models.AssetScanEstimationID
	ScanEstimationID      models.ScanEstimationID
	AssetID               models.AssetScanID
}

func (AssetScanEstimationReconcileEvent) Hash

func (AssetScanEstimationReconcileEvent) String

func (AssetScanEstimationReconcileEvent) ToFields

type Config

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

func (Config) WithBackendClient

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

func (Config) WithPollPeriod

func (c Config) WithPollPeriod(t time.Duration) Config

func (Config) WithProviderClient

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

func (Config) WithReconcileTimeout

func (c Config) WithReconcileTimeout(t time.Duration) Config

type Watcher

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

func New

func New(c Config) *Watcher

func (*Watcher) GetAssetScanEstimations

func (w *Watcher) GetAssetScanEstimations(ctx context.Context) ([]AssetScanEstimationReconcileEvent, error)

nolint:cyclop

func (*Watcher) Reconcile

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