Documentation ¶
Index ¶
- type ClusterRepository
- type ClusterService
- type Deployment
- type DeploymentRepository
- type DeploymentStatus
- type Deployments
- type ErrorCreateNamespace
- type Job
- type JobRepository
- type JobService
- type JobStatus
- type Jobs
- type Namespace
- type NamespaceEvent
- type NamespaceRepository
- type NamespaceService
- type NamespaceStatus
- type Pod
- type PodRepository
- type PodService
- type Pods
- type Port
- type Service
- type ServiceRepository
- type ServiceService
- type Statefulset
- type StatefulsetRepository
- type StatefulsetStatus
- type Statefulsets
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterRepository ¶ added in v0.4.3
type ClusterService ¶ added in v0.4.3
func NewClusterService ¶ added in v0.4.3
func NewClusterService(client ClusterRepository) ClusterService
type Deployment ¶ added in v0.8.0
type Deployment struct { Name string Status DeploymentStatus }
type DeploymentRepository ¶ added in v0.8.0
type DeploymentRepository interface {
List(namespace string) (Deployments, error)
}
type DeploymentStatus ¶ added in v0.8.0
type DeploymentStatus string
const ( DeploymentReady DeploymentStatus = "Ready" DeploymentNotReady DeploymentStatus = "NotReady" )
type Deployments ¶ added in v0.8.0
type Deployments []Deployment
type ErrorCreateNamespace ¶ added in v0.4.0
type ErrorCreateNamespace struct {
Msg string
}
ErrorCreateNamespace represents an error due to a namespace creation failure on kubernetes cluster
func (ErrorCreateNamespace) Error ¶ added in v0.4.0
func (err ErrorCreateNamespace) Error() string
Error returns the error message
type JobRepository ¶ added in v0.5.3
type JobService ¶ added in v0.5.3
func NewJobService ¶ added in v0.5.3
func NewJobService(job JobRepository) JobService
type NamespaceEvent ¶ added in v0.4.0
type NamespaceRepository ¶
type NamespaceRepository interface { Create(namespace string) error Get(namespace string) (*Namespace, error) ApplyConfig(namespace string, configPath string) error Delete(namespace string) error List() ([]Namespace, error) Watch(events chan<- NamespaceEvent) error }
NamespaceRepository defined the way namespace area actually managed.
type NamespaceService ¶
type NamespaceService interface { Create(namespace string) error ApplyConfig(namespace string, configPath string) error Delete(namespace string) error GetStatus(namespace string) (*NamespaceStatus, error) List() ([]Namespace, error) Watch(events chan NamespaceEvent) }
NamespaceService defined the way namespace are managed.
func NewNamespaceService ¶
func NewNamespaceService( namespaces NamespaceRepository, pods PodRepository, deployments DeploymentRepository, statefulsets StatefulsetRepository, jobs JobRepository, ) NamespaceService
NewNamespaceService creates a new NamespaceService
type NamespaceStatus ¶ added in v0.4.0
NamespaceStatus represent namespace with percentage of pods running and status phase (Active or Terminating)
type Pod ¶
Pod represent a Kubernetes pod. The status is the pod phase status. It could be : * running * pending etc...
type PodRepository ¶
PodRepository represents the way Pods are managed
type PodService ¶
func NewPodService ¶
func NewPodService(pods PodRepository) PodService
NewPodService returns a new PodService
type Service ¶
type Service struct { Name string `json:"name"` Ports []Port `json:"ports"` Addr string `json:"addr"` }
Service represent a kubernetes service Name is the service name Addr is the domain name where the service can be reach from outside the kubernetes cluster. For ingress exposed services it is the domain name declared in the ingress configuration for node port exposed services it is the ip / domain name of the cluster.
type ServiceRepository ¶
type ServiceRepository interface { ListExternal(n string) ([]Service, error) ListIngress(n string) ([]Service, error) }
ServiceRepository defines the way to interact with Kubernetes
type ServiceService ¶
ServiceService defines the way kubernetes services are managed
func NewServiceService ¶
func NewServiceService(services ServiceRepository) ServiceService
NewServiceService returns a ServicesService
type Statefulset ¶ added in v0.8.0
type Statefulset struct { Name string Status StatefulsetStatus }
type StatefulsetRepository ¶ added in v0.8.0
type StatefulsetRepository interface {
List(namespace string) (Statefulsets, error)
}
type StatefulsetStatus ¶ added in v0.8.0
type StatefulsetStatus string
const ( StatefulsetReady StatefulsetStatus = "Ready" StatefulsetNotReady StatefulsetStatus = "NotReady" )
type Statefulsets ¶ added in v0.8.0
type Statefulsets []Statefulset