package formatter

import "github.com/docker/cli/cli/command/stack/formatter"

Index

Constants

const (
	// KubernetesStackTableFormat is the default Kubernetes stack format
	KubernetesStackTableFormat formatter.Format = "table {{.Name}}\t{{.Services}}\t{{.Orchestrator}}\t{{.Namespace}}"

	// SwarmStackTableFormat is the default Swarm stack format
	SwarmStackTableFormat formatter.Format = "table {{.Name}}\t{{.Services}}\t{{.Orchestrator}}"

	// TableFormatKey is an alias for formatter.TableFormatKey
	TableFormatKey = formatter.TableFormatKey
)

Functions

func StackWrite

func StackWrite(ctx formatter.Context, stacks []*Stack) error

StackWrite writes formatted stacks using the Context

Types

type Context

type Context = formatter.Context

Context is an alias for formatter.Context

type Format

type Format = formatter.Format

Format is an alias for formatter.Format

type Stack

type Stack struct {
	// Name is the name of the stack
	Name string
	// Services is the number of the services
	Services int
	// Orchestrator is the platform where the stack is deployed
	Orchestrator string
	// Namespace is the Kubernetes namespace assigned to the stack
	Namespace string
}

Stack contains deployed stack information.

Source Files

formatter.go

Version
v20.10.0+incompatible
Published
Dec 7, 2020
Platform
linux/amd64
Imports
2 packages
Last checked
14 minutes ago

Tools for package owners.