appcontext

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IntentOwnerKey = "intent.yndd.io/owner"
)

Variables

This section is empty.

Functions

func GetMeta

func GetMeta(mr resource.Managed, labels, annotations map[string]string) metav1.ObjectMeta

Types

type AppContext

type AppContext interface {
	WithLogging(log logging.Logger)
	WithClient(client resource.ClientApplicator)
	WithResourceFn(gvk string, typ GvkType, key catalog.Key, renderFn catalog.Fn, resFn ResourceFn, resListFn ResourceListFn)
	WithNameSpaceName(name, namespace string) *appContext
	AddInstance(gvk string, in *catalog.Input) error
	Apply(ctx context.Context) error
}

func New

func New(opts ...Option) AppContext

type GvkType added in v0.0.14

type GvkType string
const (
	GvkTypeGeneric  GvkType = "generic"
	GvkTypeSpecific GvkType = "specific"
)

type Option

type Option func(AppContext)

Option can be used to manipulate AppContext config.

func WithClient

func WithClient(client resource.ClientApplicator) Option

WithClient initializes the client

func WithLogging

func WithLogging(log logging.Logger) Option

WithLogging initializes the logger

func WithResourceFn

func WithResourceFn(gvk string, typ GvkType, key catalog.Key, renderFn catalog.Fn, resFn ResourceFn, resListFn ResourceListFn) Option

WithResourceFn initializes the resourceFn per gvk

type ResourceFn added in v0.0.13

type ResourceFn func() resource.Managed

type ResourceListFn added in v0.0.13

type ResourceListFn func() resource.ManagedList

Jump to

Keyboard shortcuts

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