Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 (*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.