provider

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 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 Config

type Config struct {
	Meta map[string]any `mapstructure:"meta,omitempty"`
}

func (*Config) Get

func (c *Config) Get(key string) any

type GroupID

type GroupID string

type ID

type ID string

type Manager

type Manager[T v1.Resource] struct {
	// contains filtered or unexported fields
}

func (Manager[T]) Get

func (m Manager[T]) Get(ctx context.Context, mgr manager.Manager, cfg Config, providerID ID) (Provider[T], error)

func (Manager[T]) WithProvider

func (m Manager[T]) WithProvider(providerID ID, provider Provider[T]) Manager[T]

type Provider

type Provider[T v1.Resource] interface {
	SetUp(ctx context.Context, mgr manager.Manager, cfg Config) error
	Create(ctx context.Context, obj T) (*ctrl.Result, error)
	Delete(ctx context.Context, obj T) (*ctrl.Result, error)
}

type ProvidersConfig

type ProvidersConfig map[ID]Config

Jump to

Keyboard shortcuts

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