Documentation
¶
Index ¶
- type CattleOrchestrator
- func (o *CattleOrchestrator) ContainerExec(mountedVolumes *volume.MountedVolumes, command []string) (err error)
- func (o *CattleOrchestrator) DeleteWorker(container *client.Container)
- func (o *CattleOrchestrator) GetHandler() *handler.Bivac
- func (o *CattleOrchestrator) GetMountedVolumes() (containers []*volume.MountedVolumes, err error)
- func (*CattleOrchestrator) GetName() string
- func (o *CattleOrchestrator) GetVolumes() (volumes []*volume.Volume, err error)
- func (o *CattleOrchestrator) LaunchContainer(image string, env map[string]string, cmd []string, volumes []*volume.Volume) (state int, stdout string, err error)
- type DockerOrchestrator
- func (o *DockerOrchestrator) ContainerExec(mountedVolumes *volume.MountedVolumes, command []string) (err error)
- func (o *DockerOrchestrator) GetHandler() *handler.Bivac
- func (o *DockerOrchestrator) GetMountedVolumes() (containers []*volume.MountedVolumes, err error)
- func (*DockerOrchestrator) GetName() string
- func (o *DockerOrchestrator) GetVolumes() (volumes []*volume.Volume, err error)
- func (o *DockerOrchestrator) LaunchContainer(image string, env map[string]string, cmd []string, volumes []*volume.Volume) (state int, stdout string, err error)
- type KubernetesOrchestrator
- func (o *KubernetesOrchestrator) ContainerExec(mountedVolumes *volume.MountedVolumes, command []string) (err error)
- func (o *KubernetesOrchestrator) DeleteWorker(name string)
- func (o *KubernetesOrchestrator) GetHandler() *handler.Bivac
- func (o *KubernetesOrchestrator) GetMountedVolumes() (containers []*volume.MountedVolumes, err error)
- func (*KubernetesOrchestrator) GetName() string
- func (o *KubernetesOrchestrator) GetVolumes() (volumes []*volume.Volume, err error)
- func (o *KubernetesOrchestrator) LaunchContainer(image string, env map[string]string, cmd []string, volumes []*volume.Volume) (state int, stdout string, err error)
- type Orchestrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CattleOrchestrator ¶
CattleOrchestrator implements a container orchestrator for Cattle
func NewCattleOrchestrator ¶
func NewCattleOrchestrator(c *handler.Bivac) (o *CattleOrchestrator)
NewCattleOrchestrator creates a Cattle client
func (*CattleOrchestrator) ContainerExec ¶
func (o *CattleOrchestrator) ContainerExec(mountedVolumes *volume.MountedVolumes, command []string) (err error)
ContainerExec executes a command in a container
func (*CattleOrchestrator) DeleteWorker ¶
func (o *CattleOrchestrator) DeleteWorker(container *client.Container)
DeleteWorker deletes a worker
func (*CattleOrchestrator) GetHandler ¶
func (o *CattleOrchestrator) GetHandler() *handler.Bivac
GetHandler returns the Orchestrator's handler
func (*CattleOrchestrator) GetMountedVolumes ¶
func (o *CattleOrchestrator) GetMountedVolumes() (containers []*volume.MountedVolumes, err error)
GetMountedVolumes returns mounted volumes
func (*CattleOrchestrator) GetName ¶
func (*CattleOrchestrator) GetName() string
GetName returns the orchestrator name
func (*CattleOrchestrator) GetVolumes ¶
func (o *CattleOrchestrator) GetVolumes() (volumes []*volume.Volume, err error)
GetVolumes returns the Cattle volumes
type DockerOrchestrator ¶
DockerOrchestrator implements a container orchestrator for Docker
func NewDockerOrchestrator ¶
func NewDockerOrchestrator(c *handler.Bivac) (o *DockerOrchestrator)
NewDockerOrchestrator creates a Docker client
func (*DockerOrchestrator) ContainerExec ¶
func (o *DockerOrchestrator) ContainerExec(mountedVolumes *volume.MountedVolumes, command []string) (err error)
ContainerExec executes a command in a container
func (*DockerOrchestrator) GetHandler ¶
func (o *DockerOrchestrator) GetHandler() *handler.Bivac
GetHandler returns the Orchestrator's handler
func (*DockerOrchestrator) GetMountedVolumes ¶
func (o *DockerOrchestrator) GetMountedVolumes() (containers []*volume.MountedVolumes, err error)
GetMountedVolumes returns mounted volumes
func (*DockerOrchestrator) GetName ¶
func (*DockerOrchestrator) GetName() string
GetName returns the orchestrator name
func (*DockerOrchestrator) GetVolumes ¶
func (o *DockerOrchestrator) GetVolumes() (volumes []*volume.Volume, err error)
GetVolumes returns the Docker volumes, inspected and filtered
type KubernetesOrchestrator ¶
type KubernetesOrchestrator struct { Handler *handler.Bivac Client *kubernetes.Clientset }
KubernetesOrchestrator implements a container orchestrator for Kubernetes
func NewKubernetesOrchestrator ¶
func NewKubernetesOrchestrator(c *handler.Bivac) (o *KubernetesOrchestrator)
NewKubernetesOrchestrator creates a Kubernetes client
func (*KubernetesOrchestrator) ContainerExec ¶
func (o *KubernetesOrchestrator) ContainerExec(mountedVolumes *volume.MountedVolumes, command []string) (err error)
ContainerExec executes a command in a container
func (*KubernetesOrchestrator) DeleteWorker ¶
func (o *KubernetesOrchestrator) DeleteWorker(name string)
DeleteWorker deletes a worker
func (*KubernetesOrchestrator) GetHandler ¶
func (o *KubernetesOrchestrator) GetHandler() *handler.Bivac
GetHandler returns the Orchestrator's handler
func (*KubernetesOrchestrator) GetMountedVolumes ¶
func (o *KubernetesOrchestrator) GetMountedVolumes() (containers []*volume.MountedVolumes, err error)
GetMountedVolumes returns mounted volumes
func (*KubernetesOrchestrator) GetName ¶
func (*KubernetesOrchestrator) GetName() string
GetName returns the orchestrator name
func (*KubernetesOrchestrator) GetVolumes ¶
func (o *KubernetesOrchestrator) GetVolumes() (volumes []*volume.Volume, err error)
GetVolumes returns the Kubernetes persistent volume claims, inspected and filtered
type Orchestrator ¶
type Orchestrator interface { GetName() string GetHandler() *handler.Bivac GetVolumes() ([]*volume.Volume, error) LaunchContainer(image string, env map[string]string, cmd []string, volumes []*volume.Volume) (state int, stdout string, err error) GetMountedVolumes() ([]*volume.MountedVolumes, error) ContainerExec(mountedVolumes *volume.MountedVolumes, command []string) error }
Orchestrator implements a container Orchestrator interface
func GetOrchestrator ¶
func GetOrchestrator(c *handler.Bivac) (orch Orchestrator, err error)
GetOrchestrator returns the Orchestrator based on configuration or environment if not defined