workers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func GetDefaultManager

func GetDefaultManager() *Manager

func New

func New() *Manager

New is used to create the top level resource manager. Note: this is not required if you are using resources.NewApi() and the like. These use a default manager instance.

func (*Manager) AddWorker

func (m *Manager) AddWorker(name string, s StreamWorker)

func (*Manager) RegisterPolicy

func (m *Manager) RegisterPolicy(res *v1.ResourceIdentifier, actions ...v1.Action) error

func (*Manager) RegisterResource

func (m *Manager) RegisterResource(request *v1.ResourceDeclareRequest) <-chan RegisterResult

func (*Manager) Run

func (m *Manager) Run() error

type RegisterResult

type RegisterResult struct {
	Identifier *v1.ResourceIdentifier
	Err        error
}

type StreamWorker

type StreamWorker interface {
	Start(context.Context) error
}

Jump to

Keyboard shortcuts

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