Documentation
¶
Index ¶
- Constants
- Variables
- type Cluster
- type ConfigUpdater
- type CreateClusterOptions
- type CreateMachineOptions
- type Machine
- type Provisioner
- func (p *Provisioner) CreateCluster(ctx context.Context, name string, opts CreateClusterOptions) (Cluster, error)
- func (p *Provisioner) CreateMachine(ctx context.Context, clusterName string, opts CreateMachineOptions) (Machine, error)
- func (p *Provisioner) InspectCluster(ctx context.Context, name string) (Cluster, error)
- func (p *Provisioner) RemoveCluster(ctx context.Context, name string) error
- func (p *Provisioner) WaitClusterReady(ctx context.Context, c Cluster, timeout time.Duration) error
Constants ¶
View Source
const ( ClusterNameLabel = "ucind.cluster.name" ManagedLabel = "ucind.managed" )
View Source
const ( DefaultImage = "ghcr.io/psviderski/ucind:latest" UncloudAPIPort = 51000 MachineNameLabel = "ucind.machine.name" )
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type ConfigUpdater ¶
type ConfigUpdater struct {
// contains filtered or unexported fields
}
func NewConfigUpdater ¶
func NewConfigUpdater(path string) *ConfigUpdater
func (*ConfigUpdater) AddCluster ¶
func (u *ConfigUpdater) AddCluster(c Cluster) error
func (*ConfigUpdater) RemoveCluster ¶
func (u *ConfigUpdater) RemoveCluster(name string) error
type CreateClusterOptions ¶
type CreateMachineOptions ¶
type Machine ¶
type Provisioner ¶
type Provisioner struct {
// contains filtered or unexported fields
}
func NewProvisioner ¶
func NewProvisioner(cli *client.Client, configUpdater *ConfigUpdater) *Provisioner
func (*Provisioner) CreateCluster ¶
func (p *Provisioner) CreateCluster(ctx context.Context, name string, opts CreateClusterOptions) (Cluster, error)
func (*Provisioner) CreateMachine ¶
func (p *Provisioner) CreateMachine(ctx context.Context, clusterName string, opts CreateMachineOptions) (Machine, error)
func (*Provisioner) InspectCluster ¶
func (*Provisioner) RemoveCluster ¶
func (p *Provisioner) RemoveCluster(ctx context.Context, name string) error
func (*Provisioner) WaitClusterReady ¶
WaitClusterReady waits for all machines in the cluster to be ready and UP.
Click to show internal directories.
Click to hide internal directories.