Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dynamic

type Dynamic interface {
	source.Source

	// sources must be registered with a unique id
	Add(id string, src source.Source) error

	// remove a source. errors if not found
	Remove(id string) error
}

DynamicSource is a funnel for sources that can be dynamically (de)registered before & after the controller has started

type DynamicSource

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

DynamicSource implements Dynamic

func NewDynamicSource

func NewDynamicSource(ctx context.Context) *DynamicSource

func (*DynamicSource) Add

func (s *DynamicSource) Add(id string, src Stoppable) error

only Stoppable sources are currently supported

func (*DynamicSource) Remove

func (s *DynamicSource) Remove(id string) error

remove (and stop) a source

func (*DynamicSource) Start

start all the sources

type Stoppable

type Stoppable interface {
	source.Source
	inject.Stoppable
}

Stoppable is a stoppable source

Source Files