actions

package
v1.17.0-beta23 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Actions

A ClusterAction is a function that will be executed against the cluster to mutate its state.

Actions are intended to mirror actions that users of the product can take. We group these actions in a package associated with the tools that users would rely on (glooctl, kubectl..etc).

If you intend to introduce a new action, please follow this approach:

  • We want to avoid writing custom code that is just used by our tests. The core action should live in a utility package (utils, cli-utils, ...etc)
  • The ClusterAction that you add should live in the actions package associated with that tool

Example: If you expanded the functionality that a user would perform via kubectl

  1. Introduce that logic into the kubectl package
  2. Expose that as a ClusterAction in the kubectl actions package

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAction

type ClusterAction func(ctx context.Context) error

ClusterAction is a function that will be executed against the cluster If it succeeds, it will not return anything If it fails, it will return an error A ClusterAction must not panic! It is intended to be a function that can fail

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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