recorder

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBroadcasterProducer added in v0.7.0

type EventBroadcasterProducer func() (caster record.EventBroadcaster, stopWithProvider bool)

EventBroadcasterProducer makes an event broadcaster, returning whether or not the broadcaster should be stopped with the Provider, or not (e.g. if it's shared, it shouldn't be stopped with the Provider).

type Provider added in v0.7.0

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

Provider is a recorder.Provider that records events to the k8s API server and to a logr Logger.

func NewProvider

func NewProvider(config *rest.Config, scheme *runtime.Scheme, logger logr.Logger, makeBroadcaster EventBroadcasterProducer) (*Provider, error)

NewProvider create a new Provider instance.

func (*Provider) GetEventRecorderFor added in v0.7.0

func (p *Provider) GetEventRecorderFor(name string) record.EventRecorder

GetEventRecorderFor returns an event recorder that broadcasts to this provider's broadcaster. All events will be associated with a component of the given name.

func (*Provider) Stop added in v0.7.0

func (p *Provider) Stop(shutdownCtx context.Context)

Stop attempts to stop this provider, stopping the underlying broadcaster if the broadcaster asked to be stopped. It kinda tries to honor the given context, but the underlying broadcaster has an indefinite wait that doesn't return until all queued events are flushed, so this may end up just returning before the underlying wait has finished instead of cancelling the wait. This is Very Frustrating™.

Jump to

Keyboard shortcuts

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