Version: v0.12.3 Latest Latest

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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™.

Source Files

Jump to

Keyboard shortcuts

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