v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearRegistry

func ClearRegistry(_ context.Context) error

Clears all registered plugins. This should only be called after all packages/plugins have been safely loaded. Otherwise, init-based registrations will sneak through.

func GetAllTaskTypeExecutors

func GetAllTaskTypeExecutors() map[types.TaskType]types.Executor

func GetTaskExecutor

func GetTaskExecutor(taskType types.TaskType) (types.Executor, error)

func K8sRegisterAsDefault

func K8sRegisterAsDefault(id string, resourceToWatch runtime.Object, resyncPeriod time.Duration, handler flytek8s.K8sResourceHandler) error

func K8sRegisterForTaskTypes

func K8sRegisterForTaskTypes(id string, resourceToWatch runtime.Object, resyncPeriod time.Duration, handler flytek8s.K8sResourceHandler, taskTypes ...types.TaskType) error

func ListAllTaskExecutors

func ListAllTaskExecutors() []types.Executor

func RegisterAsDefault

func RegisterAsDefault(executor types.Executor) error

func RegisterForTaskTypes

func RegisterForTaskTypes(executor types.Executor, taskTypes ...types.TaskType) error

func RegisterLoader

func RegisterLoader(fn PluginLoaderFn)

Registers a plugin loader to be called when it's safe to perform plugin initialization logic. This function is NOT thread-safe and is expected to be called in an init() function (which runs in a single thread).

func RunAllLoaders

func RunAllLoaders(ctx context.Context) error

Runs all plugin loader functions and errors out if any of the loaders fails to finish successfully.

Types

type PluginLoaderFn

type PluginLoaderFn func(ctx context.Context) error

Jump to

Keyboard shortcuts

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