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 ¶
func NewApi( inventories playbook.InventoryRepository, configs playbook.ConfigRepository, playbooks playbook.PlaybookRepository, namespaces resource.NamespaceRepository, pods resource.PodRepository, deployments resource.DeploymentRepository, statefulsets resource.StatefulsetRepository, services resource.ServiceRepository, cluster resource.ClusterRepository, job resource.JobRepository, ) Api
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.
Click to show internal directories.
Click to hide internal directories.