workflowcontext

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package workflowcontext contains utility functions for populating workflow context specific data in a context.Context.

Data appropriate for the context includes anything that cannot be determined at time of object construction. For example, a bootstrap cluster does not exist when executing management workflows, therefore a Kubeconfig isn't available to communicate with the cluster so must be passed as contextual data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapCluster

func BootstrapCluster(ctx context.Context) *types.Cluster

BootstrapCluster retrieves the bootstrap cluster configured in ctx or returns a nil pointer.

func ManagementCluster added in v0.13.0

func ManagementCluster(ctx context.Context) *types.Cluster

ManagementCluster retrieves the management cluster configured in ctx or returns a nil pointer.

func WithBootstrapAsManagementCluster added in v0.13.0

func WithBootstrapAsManagementCluster(ctx context.Context, cluster *types.Cluster) context.Context

WithBootstrapAsManagementCluster is shorthand for WithBootstrapCluster followed by WithManagementCluster.

func WithBootstrapCluster

func WithBootstrapCluster(ctx context.Context, cluster *types.Cluster) context.Context

WithBootstrapCluster returns a context based on ctx containing the target cluster kubeconfig.

func WithManagementCluster added in v0.13.0

func WithManagementCluster(ctx context.Context, cluster *types.Cluster) context.Context

WithManagementCluster returns a context based on ctx containing a management cluster.

func WithWorkloadCluster added in v0.13.0

func WithWorkloadCluster(ctx context.Context, cluster *types.Cluster) context.Context

WithWorkloadCluster returns a context based on ctx containing the target cluster kubeconfig.

func WorkloadCluster added in v0.13.0

func WorkloadCluster(ctx context.Context) *types.Cluster

WorkloadCluster retrieves the workload cluster configured in ctx or returns a nil pointer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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