pkg

package
v0.0.0-...-6385711 Latest Latest
Warning

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

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

Documentation

Overview

Package pkg contains public libraries for building tools on top of cli-experimental.

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(
	wire.Struct(new(apply.Apply), "DynamicClient", "Out"),
	wire.Struct(new(prune.Prune), "DynamicClient", "Out"),
	wire.Struct(new(delete.Delete), "DynamicClient", "Out"),
	wire.Struct(new(status.Status), "DynamicClient", "Out"),
	wire.Struct(new(Cmd), "*"),
	wirek8s.ProviderSet,
)

ProviderSet provides the dependencies for creating a Cmd object

View Source
var ProviderSetForTesting = wire.NewSet(
	wirek8s.NewKubernetesClientSet, wirek8s.NewExtensionsClientSet, wirek8s.NewDynamicClient,
	wiretest.NewRestConfig, wirek8s.NewClient, wirek8s.NewRestMapper,
	wire.Struct(new(apply.Apply), "DynamicClient", "Out"),
	wire.Struct(new(prune.Prune), "DynamicClient", "Out"),
	wire.Struct(new(status.Status), "DynamicClient", "Out"),
	wire.Struct(new(delete.Delete), "DynamicClient", "Out"),
	wire.Struct(new(Cmd), "*"),
)

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Applier      *apply.Apply
	Pruner       *prune.Prune
	Deleter      *delete.Delete
	StatusGetter *status.Status
}

Cmd is a wrapper for different structs:

apply, prune and delete

These structs share the same client

func InitializeCmd

func InitializeCmd(writer io.Writer, args util.Args) (*Cmd, error)

func InitializeFakeCmd

func InitializeFakeCmd(writer io.Writer, args util.Args) (*Cmd, func(), error)

func (*Cmd) Apply

func (a *Cmd) Apply(resources []*unstructured.Unstructured) error

Apply applies resources given the input as a slice of unstructured resources

func (*Cmd) Delete

func (a *Cmd) Delete(resources []*unstructured.Unstructured) error

Delete deletes resources given the input as a slice of unstructured resources

func (*Cmd) Prune

func (a *Cmd) Prune(resources []*unstructured.Unstructured) error

Prune prunes resources given the input as a slice of unstructured resources

func (*Cmd) Status

func (a *Cmd) Status(resources []*unstructured.Unstructured) error

Status returns the status given the input as a slice of unstructured resources

Jump to

Keyboard shortcuts

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