Documentation ¶
Index ¶
- func AddToScheme(scheme *runtime.Scheme) *runtime.Scheme
- func Register(builder *scheme.Builder)
- type Exchanger
- func (e *Exchanger) AllExchangerReady(cli client.Client, self runtime.Object) (bool, error)
- func (e *Exchanger) Create(cli client.Client, traitResource runtime.Object, ...) error
- func (e *Exchanger) Delete(cli client.Client, traitResource runtime.Object, ...) error
- func (e *Exchanger) Resources(cli client.Client, self runtime.Object, list runtime.Object) error
- type ExchangerOption
- type TraitExchanger
- type WorkloadExchanger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Exchanger ¶
type Exchanger struct {
// contains filtered or unexported fields
}
func (*Exchanger) AllExchangerReady ¶
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
type ExchangerOption ¶
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
Click to show internal directories.
Click to hide internal directories.