Documentation
¶
Index ¶
- func WithLabelParams(parent context.Context, labels map[string]string) context.Context
- func WithRuntimeParams(parent context.Context, params RuntimeParams) context.Context
- type ContextKey
- type Deleter
- type Dispatcher
- type GenericProviderFn
- type KubeHandlers
- type LegacyGenericProviderFn
- type LegacyNativeProviderFn
- type LegacyParams
- type NativeProviderFn
- type Params
- type Returns
- type RuntimeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLabelParams ¶
WithLabelParams returns a copy of parent in which the labels value is set
func WithRuntimeParams ¶
func WithRuntimeParams(parent context.Context, params RuntimeParams) context.Context
WithRuntimeParams returns a copy of parent in which the runtime params value is set
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey is the key type for context values.
const ( // WorkflowContextKey is the key for workflow context. WorkflowContextKey ContextKey = "workflowContext" // ProcessContextKey is the key for process context. ProcessContextKey ContextKey = "processContext" // ActionKey is the key for action. ActionKey ContextKey = "action" // LabelsKey is the key for labels. LabelsKey ContextKey = "labels" // KubeHandlersKey is the key for kube handlers. KubeHandlersKey ContextKey = "kubeHandlers" // KubeClientKey is the key for kube client. KubeClientKey ContextKey = "kubeClient" )
type Deleter ¶
type Deleter func(ctx context.Context, client client.Client, cluster, owner string, manifest *unstructured.Unstructured) error
Deleter is a client for delete resources.
type Dispatcher ¶
type Dispatcher func(ctx context.Context, client client.Client, cluster, owner string, manifests ...*unstructured.Unstructured) error
Dispatcher is a client for apply resources.
type GenericProviderFn ¶
GenericProviderFn is the provider function
type KubeHandlers ¶
type KubeHandlers struct {
Apply Dispatcher
Delete Deleter
}
KubeHandlers handles resources.
type LegacyGenericProviderFn ¶
LegacyGenericProviderFn is the legacy provider function
type LegacyNativeProviderFn ¶
LegacyNativeProviderFn is the legacy native provider function
type LegacyParams ¶
type LegacyParams[T any] struct { Params T RuntimeParams }
LegacyParams is the legacy input parameters of a provider.
type NativeProviderFn ¶
NativeProviderFn is the legacy native provider function
type Params ¶
type Params[T any] struct { Params T `json:"$params"` RuntimeParams }
Params is the input parameters of a provider.
type Returns ¶
type Returns[T any] struct { Returns T `json:"$returns"` }
Returns is the returns of a provider.
type RuntimeParams ¶
type RuntimeParams struct {
WorkflowContext wfContext.Context
ProcessContext process.Context
Action types.Action
FieldLabel string
Labels map[string]string
KubeHandlers *KubeHandlers
KubeClient client.Client
}
RuntimeParams is the runtime parameters of a provider.
func RuntimeParamsFrom ¶
func RuntimeParamsFrom(ctx context.Context) RuntimeParams
RuntimeParamsFrom returns the runtime params value stored in ctx, if any.