cluster

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterState

type ClusterState struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(config corroclient.Config) (*ClusterState, error)

func (*ClusterState) CreateGateway

func (c *ClusterState) CreateGateway(ctx context.Context, gateway core.Gateway) error

func (*ClusterState) CreateMachine

func (c *ClusterState) CreateMachine(ctx context.Context, m core.Machine, mv core.MachineVersion) error

func (*ClusterState) DeleteGateway

func (c *ClusterState) DeleteGateway(ctx context.Context, id string) error

func (*ClusterState) DestroyMachine

func (c *ClusterState) DestroyMachine(ctx context.Context, id string) error

func (*ClusterState) GetAPIMachine

func (c *ClusterState) GetAPIMachine(ctx context.Context, namespace, fleetId, machineId string) (*api.Machine, error)

func (*ClusterState) GetInstance

func (c *ClusterState) GetInstance(ctx context.Context, id string) (*Instance, error)

func (*ClusterState) GetMachine

func (c *ClusterState) GetMachine(ctx context.Context, namespace string, fleetId string, id string, destroyed bool) (*core.Machine, error)

func (*ClusterState) GetNode

func (m *ClusterState) GetNode(ctx context.Context, id string) (core.Node, error)

func (*ClusterState) ListAPIMachines

func (c *ClusterState) ListAPIMachines(ctx context.Context, namespace string, fleetId string, includeDestroyed bool) ([]api.Machine, error)

func (*ClusterState) ListMachines

func (c *ClusterState) ListMachines(ctx context.Context, namespace string, fleet string, destroyed bool) ([]core.Machine, error)

func (*ClusterState) ListNodes

func (m *ClusterState) ListNodes(ctx context.Context) ([]core.Node, error)

func (*ClusterState) ListNodesInRegion

func (m *ClusterState) ListNodesInRegion(ctx context.Context, region string) ([]core.Node, error)

func (*ClusterState) UpsertInstance

func (c *ClusterState) UpsertInstance(ctx context.Context, i Instance) error

func (*ClusterState) UpsertNode

func (m *ClusterState) UpsertNode(ctx context.Context, node core.Node) error

func (*ClusterState) WatchInstance

func (c *ClusterState) WatchInstance(ctx context.Context, machineId string, instanceId string) (context.CancelFunc, <-chan Instance, error)

type Instance

type Instance struct {
	Id             string             `json:"id"`
	Node           string             `json:"node"`
	MachineId      string             `json:"machine_id"`
	MachineVersion string             `json:"machine_version"`
	Status         core.MachineStatus `json:"status"`
	LocalIPV4      string             `json:"local_ipv4"`
	CreatedAt      time.Time          `json:"created_at"`
	UpdatedAt      time.Time          `json:"updated_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL