statusrep

package
v0.0.0-...-d216c5d Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backoff

type Backoff interface {
	Step() time.Duration
}

Backoff wraps a timer-based-retry type which can be stepped.

type EndpointStatusFileReporter

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

EndpointStatusFileReporter writes a file to the FS any time it sees an Endpoint go up in the dataplane.

  • Currently only writes to a directory "status", creating an entry for each workload, when each workload's policy is programmed for the first time.

func NewEndpointStatusFileReporter

func NewEndpointStatusFileReporter(
	endpointUpdatesC <-chan interface{},
	statusDirPath string,
	opts ...FileReporterOption,
) *EndpointStatusFileReporter

NewEndpointStatusFileReporter creates a new EndpointStatusFileReporter.

func (*EndpointStatusFileReporter) SyncForever

func (fr *EndpointStatusFileReporter) SyncForever(ctx context.Context)

SyncForever blocks until ctx is cancelled. Continuously pulls status-updates from updates C, and reconciles the filesystem with internal state.

type EndpointStatusReporter

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

func NewEndpointStatusReporter

func NewEndpointStatusReporter(hostname string,
	region string,
	endpointUpdates <-chan interface{},
	datastore datastore,
	reportingDelay time.Duration,
	resyncInterval time.Duration) *EndpointStatusReporter

func (*EndpointStatusReporter) Start

func (esr *EndpointStatusReporter) Start()

func (*EndpointStatusReporter) Stop

func (esr *EndpointStatusReporter) Stop()

type FileReporterOption

type FileReporterOption func(*EndpointStatusFileReporter)

FileReporterOption allows modification of a new EndpointStatusFileReporter.

func WithFilesys

func WithFilesys(f filesys) FileReporterOption

WithFilesys allows shimming into filesystem calls.

func WithHostname

func WithHostname(hostname string) FileReporterOption

WithHostname instructs the reporter to use the give hostname when creating endpoint structures.

func WithNewBackoffFunc

func WithNewBackoffFunc(newBackoffFunc func() Backoff) FileReporterOption

WithNewBackoffFunc returns a FileReporterOption which alters the backoff used by the reporter's backoff manager.

Jump to

Keyboard shortcuts

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