helpers

package
v0.11.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 29 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindRootAPIs added in v0.6.0

func BindRootAPIs(ctx context.Context, kcpClient kcpclient.Interface, exportNames ...string) error

func Bootstrap

func Bootstrap(ctx context.Context, discoveryClient discovery.DiscoveryInterface, dynamicClient dynamic.Interface, batteriesIncluded sets.String, fs embed.FS, opts ...Option) error

Bootstrap creates resources in a package's fs by continuously retrying the list. This is blocking, i.e. it only returns (with error) when the context is closed or with nil when the bootstrapping is successfully completed.

func CreateResourceFromFS

func CreateResourceFromFS(ctx context.Context, client dynamic.Interface, mapper meta.RESTMapper, batteriesIncluded sets.String, filename string, fs embed.FS, transformers ...TransformFileFunc) error

CreateResourceFromFS creates given resource file.

func CreateResourcesFromFS

func CreateResourcesFromFS(ctx context.Context, client dynamic.Interface, mapper meta.RESTMapper, batteriesIncluded sets.String, fs embed.FS, transformers ...TransformFileFunc) error

CreateResourcesFromFS creates all resources from a filesystem.

Types

type Option

type Option struct {
	// TransformFileFunc is a function that transforms a resource file before being applied to the cluster.
	TransformFile TransformFileFunc
}

Option allows to customize the bootstrap process.

func ReplaceOption

func ReplaceOption(pairs ...string) Option

ReplaceOption allows to customize the bootstrap process.

type TransformFileFunc

type TransformFileFunc func(bs []byte) ([]byte, error)

TransformFileFunc transforms a resource file before being applied to the cluster.

Jump to

Keyboard shortcuts

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