runtime

package
v0.0.0-...-d46a6ae Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToScheme

func AddToScheme(scheme *runtime.Scheme) *runtime.Scheme

func Register

func Register(builder *scheme.Builder)

Types

type Exchanger

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

func (*Exchanger) AllExchangerReady

func (e *Exchanger) AllExchangerReady(cli client.Client, self runtime.Object) (bool, error)

AllExchangerReady returns all related exchange crds, by given workload resource, are created or not

func (*Exchanger) Create

func (e *Exchanger) Create(cli client.Client, traitResource runtime.Object, exchangeResource runtime.Object) error

CreateExchangeResource automatically sets owner reference, finalizer, label of workload into exchange resource, then create the exchange resource note: this function MUST be called by tait

func (*Exchanger) Delete

func (e *Exchanger) Delete(cli client.Client, traitResource runtime.Object, exchangeResource runtime.Object) error

Delete exchange resource

func (*Exchanger) Resources

func (e *Exchanger) Resources(cli client.Client, self runtime.Object, list runtime.Object) error

Resources sets list resource which realated to self resource

type ExchangerOption

type ExchangerOption func(e *Exchanger) error

func WithExchanger

func WithExchanger(obj runtime.Object) ExchangerOption

WithExchanger returns a ExchangerOption which can register given obj to Exchanger

func WithLogger

func WithLogger(l logr.Logger) ExchangerOption

WithLogger is a option for set Exchanger logger

type TraitExchanger

type TraitExchanger interface {
	Resources(cli client.Client, self runtime.Object, exchangeListResource runtime.Object) error
	Create(cli client.Client, self runtime.Object, exchangeResource runtime.Object) error
	Delete(cli client.Client, self runtime.Object, exchangeResource runtime.Object) error
}

TraitExchanger for trait

func NewTraitExchanger

func NewTraitExchanger(opts ...ExchangerOption) (TraitExchanger, error)

NewTraitExchanger return TraitExchanger for trait controller

type WorkloadExchanger

type WorkloadExchanger interface {
	Resources(cli client.Client, self runtime.Object, exchangeListResource runtime.Object) error
	AllExchangerReady(cli client.Client, self runtime.Object) (bool, error)
}

WorkloadExchanger for workload

func NewWorkloadExchanger

func NewWorkloadExchanger(opts ...ExchangerOption) (WorkloadExchanger, error)

NewWorkloadExchanger return rWorkloadExchanger for trait controller

Jump to

Keyboard shortcuts

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