cli

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package cli executes greymatter CLI commands to configure mesh behavior in Control and Catalog APIs in each install namespace for each mesh. It enables Mesh CR specifications to define how a mesh should be configured.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

CLI exposes methods for configuring clients that execute greymatter CLI commands.

func New

func New(ctx context.Context, load cuemodule.Loader, mTLSEnabled bool) (*CLI, error)

New returns a new *CLI instance. It receives a context for cleaning up goroutines started by the *CLI.

func (*CLI) ConfigureMeshClient

func (c *CLI) ConfigureMeshClient(mesh *v1alpha1.Mesh)

ConfigureMeshClient initializes or updates a client with flags specifying connection options for reaching Control and Catalog for the given Mesh CR.

func (*CLI) ConfigureService

func (c *CLI) ConfigureService(mesh, workload string, obj runtime.Object)

ConfigureService applies fabric objects that add a workload to the mesh specified given the workload's annotations and a list of its corev1.Containers.

func (*CLI) RemoveMeshClient

func (c *CLI) RemoveMeshClient(name string)

RemoveMeshClient cleans up a client's goroutines before removing it from the *CLI.

func (*CLI) RemoveService

func (c *CLI) RemoveService(mesh, workload string, obj runtime.Object)

RemoveService removes fabric objects, disconnecting the workload from the mesh specified, along with all ingress and egress cluster routes derived from the given annotations and containers.

Jump to

Keyboard shortcuts

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