Documentation ¶
Index ¶
- type Action
- type DB
- func (db *DB) Count(value interface{}) error
- func (db *DB) Create(m model.Model) error
- func (db *DB) Delete(m model.Model) error
- func (db *DB) Find(out interface{}, where ...interface{}) error
- func (db *DB) First(out interface{}, where ...interface{}) error
- func (db *DB) Limit(limit interface{}) core.DBInterface
- func (db *DB) Model(value interface{}) core.DBInterface
- func (db *DB) Offset(offset interface{}) core.DBInterface
- func (db *DB) Preload(column string, conditions ...interface{}) core.DBInterface
- func (db *DB) Save(m model.Model) error
- func (db *DB) Update(attrs ...interface{}) error
- func (db *DB) Where(query interface{}, args ...interface{}) core.DBInterface
- type KubeResources
- func (c *KubeResources) Create(m *model.KubeResource) error
- func (c *KubeResources) Delete(id *int64, m *model.KubeResource) core.ActionInterface
- func (c *KubeResources) Get(id *int64, m model.Model) error
- func (c *KubeResources) GetWithIncludes(id *int64, m model.Model, includes []string) error
- func (c *KubeResources) Populate() error
- func (c *KubeResources) Refresh(m *model.KubeResource) error
- func (c *KubeResources) Start(id *int64, m *model.KubeResource) core.ActionInterface
- func (c *KubeResources) Stop(id *int64, m *model.KubeResource) core.ActionInterface
- func (c *KubeResources) Update(id *int64, oldM *model.KubeResource, m *model.KubeResource) error
- type KubernetesClient
- func (k *KubernetesClient) CreateResource(apiVersion string, kind string, namespace string, objIn interface{}, ...) error
- func (k *KubernetesClient) DeleteResource(apiVersion string, kind string, namespace string, name string) error
- func (k *KubernetesClient) EnsureNamespace(name string) error
- func (k *KubernetesClient) GetPodLog(namespace string, name string) (string, error)
- func (k *KubernetesClient) GetResource(apiVersion string, kind string, namespace string, name string, out interface{}) error
- func (k *KubernetesClient) ListEvents(query string) ([]*kubernetes.Event, error)
- func (k *KubernetesClient) ListNamespaces(query string) ([]*kubernetes.Namespace, error)
- func (k *KubernetesClient) ListNodeHeapsterStats() ([]*kubernetes.HeapsterStats, error)
- func (k *KubernetesClient) ListNodes(query string) ([]*kubernetes.Node, error)
- func (k *KubernetesClient) ListPersistentVolumes(query string) ([]*kubernetes.PersistentVolume, error)
- func (k *KubernetesClient) ListPodHeapsterCPUUsageMetrics(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)
- func (k *KubernetesClient) ListPodHeapsterRAMUsageMetrics(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)
- func (k *KubernetesClient) ListPods(query string) ([]*kubernetes.Pod, error)
- func (k *KubernetesClient) ListServices(query string) ([]*kubernetes.Service, error)
- func (k *KubernetesClient) UpdateResource(apiVersion string, kind string, namespace string, name string, ...) error
- type Nodes
- func (c *Nodes) Create(m *model.Node) error
- func (c *Nodes) Delete(id *int64, m *model.Node) core.ActionInterface
- func (c *Nodes) Get(id *int64, m model.Model) error
- func (c *Nodes) GetWithIncludes(id *int64, m model.Model, includes []string) error
- func (c *Nodes) HasPodsWithReservedResources(m *model.Node) (bool, error)
- func (c *Nodes) Provision(id *int64, m *model.Node) core.ActionInterface
- func (c *Nodes) Update(id *int64, oldM model.Model, m model.Model) error
- type Provider
- func (p *Provider) CreateKube(m *model.Kube, a *core.Action) error
- func (p *Provider) CreateLoadBalancer(m *model.LoadBalancer, a *core.Action) error
- func (p *Provider) CreateNode(m *model.Node, a *core.Action) error
- func (p *Provider) DeleteKube(m *model.Kube, a *core.Action) error
- func (p *Provider) DeleteLoadBalancer(m *model.LoadBalancer, a *core.Action) error
- func (p *Provider) DeleteNode(m *model.Node, a *core.Action) error
- func (p *Provider) UpdateLoadBalancer(m *model.LoadBalancer, a *core.Action) error
- func (p *Provider) ValidateAccount(m *model.CloudAccount) error
- type Provisioner
- type Sessions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { NowFn func() error AsyncFn func() error CancellableWaitForFn func(string, time.Duration, time.Duration, func() (bool, error)) error GetStatusFn func() *model.ActionStatus }
func (*Action) CancellableWaitFor ¶
func (*Action) GetStatus ¶
func (a *Action) GetStatus() *model.ActionStatus
type DB ¶
type DB struct { CreateFn func(model.Model) error SaveFn func(model.Model) error FindFn func(out interface{}, where ...interface{}) error FirstFn func(out interface{}, where ...interface{}) error DeleteFn func(m model.Model) error PreloadFn func(column string, conditions ...interface{}) core.DBInterface WhereFn func(query interface{}, args ...interface{}) core.DBInterface LimitFn func(limit interface{}) core.DBInterface OffsetFn func(offset interface{}) core.DBInterface ModelFn func(value interface{}) core.DBInterface UpdateFn func(attrs ...interface{}) error CountFn func(interface{}) error }
func (*DB) Limit ¶
func (db *DB) Limit(limit interface{}) core.DBInterface
func (*DB) Model ¶
func (db *DB) Model(value interface{}) core.DBInterface
func (*DB) Offset ¶
func (db *DB) Offset(offset interface{}) core.DBInterface
func (*DB) Preload ¶
func (db *DB) Preload(column string, conditions ...interface{}) core.DBInterface
func (*DB) Where ¶
func (db *DB) Where(query interface{}, args ...interface{}) core.DBInterface
type KubeResources ¶
type KubeResources struct { PopulateFn func() error CreateFn func(*model.KubeResource) error GetFn func(*int64, model.Model) error GetWithIncludesFn func(*int64, model.Model, []string) error UpdateFn func(*int64, *model.KubeResource, *model.KubeResource) error DeleteFn func(*int64, *model.KubeResource) core.ActionInterface StartFn func(*int64, *model.KubeResource) core.ActionInterface StopFn func(*int64, *model.KubeResource) core.ActionInterface RefreshFn func(*model.KubeResource) error }
func (*KubeResources) Create ¶
func (c *KubeResources) Create(m *model.KubeResource) error
func (*KubeResources) Delete ¶
func (c *KubeResources) Delete(id *int64, m *model.KubeResource) core.ActionInterface
func (*KubeResources) GetWithIncludes ¶
func (*KubeResources) Populate ¶ added in v0.14.0
func (c *KubeResources) Populate() error
func (*KubeResources) Refresh ¶
func (c *KubeResources) Refresh(m *model.KubeResource) error
func (*KubeResources) Start ¶
func (c *KubeResources) Start(id *int64, m *model.KubeResource) core.ActionInterface
func (*KubeResources) Stop ¶
func (c *KubeResources) Stop(id *int64, m *model.KubeResource) core.ActionInterface
func (*KubeResources) Update ¶
func (c *KubeResources) Update(id *int64, oldM *model.KubeResource, m *model.KubeResource) error
type KubernetesClient ¶
type KubernetesClient struct { EnsureNamespaceFn func(name string) error GetResourceFn func(apiVersion, kind, namespace, name string, out interface{}) error CreateResourceFn func(apiVersion, kind, namespace string, in, out interface{}) error UpdateResourceFn func(apiVersion, kind, namespace, name string, objIn interface{}, out interface{}) error DeleteResourceFn func(apiVersion, kind, namespace, name string) error ListNamespacesFn func(query string) ([]*kubernetes.Namespace, error) ListEventsFn func(query string) ([]*kubernetes.Event, error) ListNodesFn func(query string) ([]*kubernetes.Node, error) ListPodsFn func(query string) ([]*kubernetes.Pod, error) ListServicesFn func(query string) ([]*kubernetes.Service, error) ListPersistentVolumesFn func(query string) ([]*kubernetes.PersistentVolume, error) ListNodeHeapsterStatsFn func() ([]*kubernetes.HeapsterStats, error) ListPodHeapsterCPUUsageMetricsFn func(namespace, name string) ([]*kubernetes.HeapsterMetric, error) ListPodHeapsterRAMUsageMetricsFn func(namespace, name string) ([]*kubernetes.HeapsterMetric, error) GetPodLogFn func(namespace, name string) (string, error) }
func (*KubernetesClient) CreateResource ¶
func (k *KubernetesClient) CreateResource(apiVersion string, kind string, namespace string, objIn interface{}, out interface{}) error
func (*KubernetesClient) DeleteResource ¶
func (*KubernetesClient) EnsureNamespace ¶
func (k *KubernetesClient) EnsureNamespace(name string) error
func (*KubernetesClient) GetPodLog ¶ added in v0.14.0
func (k *KubernetesClient) GetPodLog(namespace string, name string) (string, error)
func (*KubernetesClient) GetResource ¶
func (*KubernetesClient) ListEvents ¶
func (k *KubernetesClient) ListEvents(query string) ([]*kubernetes.Event, error)
func (*KubernetesClient) ListNamespaces ¶
func (k *KubernetesClient) ListNamespaces(query string) ([]*kubernetes.Namespace, error)
func (*KubernetesClient) ListNodeHeapsterStats ¶
func (k *KubernetesClient) ListNodeHeapsterStats() ([]*kubernetes.HeapsterStats, error)
func (*KubernetesClient) ListNodes ¶
func (k *KubernetesClient) ListNodes(query string) ([]*kubernetes.Node, error)
func (*KubernetesClient) ListPersistentVolumes ¶ added in v0.14.0
func (k *KubernetesClient) ListPersistentVolumes(query string) ([]*kubernetes.PersistentVolume, error)
func (*KubernetesClient) ListPodHeapsterCPUUsageMetrics ¶
func (k *KubernetesClient) ListPodHeapsterCPUUsageMetrics(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)
func (*KubernetesClient) ListPodHeapsterRAMUsageMetrics ¶
func (k *KubernetesClient) ListPodHeapsterRAMUsageMetrics(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)
func (*KubernetesClient) ListPods ¶
func (k *KubernetesClient) ListPods(query string) ([]*kubernetes.Pod, error)
func (*KubernetesClient) ListServices ¶ added in v0.14.0
func (k *KubernetesClient) ListServices(query string) ([]*kubernetes.Service, error)
func (*KubernetesClient) UpdateResource ¶ added in v0.14.0
type Nodes ¶ added in v0.11.2
type Nodes struct { CreateFn func(*model.Node) error ProvisionFn func(*int64, *model.Node) core.ActionInterface GetFn func(*int64, model.Model) error GetWithIncludesFn func(*int64, model.Model, []string) error UpdateFn func(*int64, model.Model, model.Model) error DeleteFn func(*int64, *model.Node) core.ActionInterface HasPodsWithReservedResourcesFn func(*model.Node) (bool, error) }
func (*Nodes) GetWithIncludes ¶ added in v0.11.2
func (*Nodes) HasPodsWithReservedResources ¶ added in v0.11.2
type Provider ¶
type Provider struct { ValidateAccountFn func(*model.CloudAccount) error CreateKubeFn func(*model.Kube, *core.Action) error DeleteKubeFn func(*model.Kube, *core.Action) error CreateNodeFn func(*model.Node, *core.Action) error DeleteNodeFn func(*model.Node, *core.Action) error CreateLoadBalancerFn func(*model.LoadBalancer, *core.Action) error UpdateLoadBalancerFn func(*model.LoadBalancer, *core.Action) error DeleteLoadBalancerFn func(*model.LoadBalancer, *core.Action) error }
func (*Provider) CreateLoadBalancer ¶ added in v0.14.0
func (*Provider) DeleteLoadBalancer ¶ added in v0.14.0
func (*Provider) UpdateLoadBalancer ¶ added in v0.14.0
func (*Provider) ValidateAccount ¶
func (p *Provider) ValidateAccount(m *model.CloudAccount) error
type Provisioner ¶
type Provisioner struct { ProvisionFn func(*model.KubeResource) error IsRunningFn func(*model.KubeResource) (bool, error) TeardownFn func(*model.KubeResource) error }
func (*Provisioner) IsRunning ¶
func (p *Provisioner) IsRunning(m *model.KubeResource) (bool, error)
func (*Provisioner) Provision ¶
func (p *Provisioner) Provision(m *model.KubeResource) error
func (*Provisioner) Teardown ¶
func (p *Provisioner) Teardown(m *model.KubeResource) error
Click to show internal directories.
Click to hide internal directories.