api

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api interface {
	Inventories() playbook.InventoryService
	Namespaces() resource.NamespaceService
	Playbooks() playbook.PlaybookService
	Pods() resource.PodService
	Create(namespace string) (playbook.Inventory, error)
	Delete(namespace string, wait bool) error
	ListExposedServices(namespace string) ([]resource.Service, error)
	ListNamespaces() ([]Namespace, error)
	Reset(namespace string, configPath string) error
	Apply(namespace string, configPath string) error
	Update(namespace string, inventory playbook.Inventory, configPath string) error
	WaitForNamespaceReady(namespace string, timeout time.Duration, bar progress) error
	GetVersion() (*Version, error)
	DeleteResource(namespace string, resource string) error
	WatchNamespaceDeleted()
}

Api represents the blackbeard entrypoint by defining the list of actions blackbeard is able to perform.

func NewApi

NewApi creates a blackbeard api. The blackbeard api is responsible for managing playbooks and namespaces. Parameters are struct implementing respectively Inventory, Config, Namespace, Pod and Service interfaces.

type Namespace

type Namespace struct {
	//Name is the namespace name
	Name string
	//Phase is the namespace status phase. It could be "active" or "terminating"
	Phase string
	//Status is the namespace status. It is a percentage of runnning pods vs all pods in the namespace.
	Status int
	//Managed is true if the namespace as an associated inventory on the current playbook. False if not.
	Managed bool
}

Namespace represents a kubernetes namespace enrich with informations from the playbook.

type Version added in v0.4.3

type Version struct {
	Blackbeard string `json:"blackbeard"`
	Kubernetes string `json:"kubernetes"`
	Kubectl    string `json:"kubectl"`
}

Jump to

Keyboard shortcuts

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