controllerinit

package
Version: v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner func(context.Context)

Runner is something that can be run such as a series of controllers. Blocks until context is canceled.

type RunnerBuilder

type RunnerBuilder func(context.Context) (Runner, error)

RunnerBuilder is a function that can be used to construct a Runner. It is expected to be called in the main go routine since the construction can fail.

func Prepare

func Prepare(controllers Runner, controllersWrapper RunnerWrapper, informers ...informer) RunnerBuilder

Prepare returns RunnerBuilder that, when called:

1. Starts all provided informers and waits for them sync (and fails if they hang)
2. Returns a Runner that combines the Runner and RunnerWrapper passed into Prepare

type RunnerWrapper

type RunnerWrapper func(context.Context, Runner)

RunnerWrapper takes a Runner and wraps its execution with other logic. Blocks until context is canceled. RunnerWrapper is responsible for the lifetime of the passed in Runner.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL