Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent interface { // PutMachine confirm an allocation placed before on the agent // It returns the machine instance created on the agent // The agent should then create an instance of the machine and start it // if the start flag is set to true PutMachine(ctx context.Context, opt PutMachineOptions) (*MachineInstance, error) StartMachine(ctx context.Context, machineId string) error StopMachine(ctx context.Context, machineId string, opt *api.StopConfig) error MachineExec(ctx context.Context, machineId string, cmd []string, timeout time.Duration) (*api.ExecResult, error) DestroyMachine(ctx context.Context, machineId string, force bool) error SubscribeToMachineLogs(ctx context.Context, id string) ([]*api.LogEntry, <-chan *api.LogEntry, error) GetMachineLogs(ctx context.Context, id string) ([]*api.LogEntry, error) }
type ClusterState ¶
type ClusterState interface { CreateGateway(ctx context.Context, gateway api.Gateway) error DeleteGateway(ctx context.Context, id string) error DeleteFleetGateways(ctx context.Context, fleetId string) error CreateMachine(ctx context.Context, m Machine, mv api.MachineVersion) error UpdateMachine(ctx context.Context, m Machine) error DestroyMachine(ctx context.Context, id string) error UpsertInstance(ctx context.Context, i MachineInstance) error WatchInstanceStatus(ctx context.Context, machineId string, instanceId string) (<-chan instance.InstanceStatus, error) GetNode(ctx context.Context, id string) (api.Node, error) UpsertNode(ctx context.Context, node api.Node) error ListNodesInRegion(ctx context.Context, region string) ([]api.Node, error) ListNodes(ctx context.Context) ([]api.Node, error) ListAPIMachines(ctx context.Context, namespace string, fleetId string, includeDestroyed bool) ([]api.Machine, error) GetAPIMachine(ctx context.Context, namespace string, fleetId string, machineId string) (*api.Machine, error) DestroyNamespaceData(ctx context.Context, namespace string) error }
type Machine ¶
type Machine struct { Id string `json:"id"` Namespace string `json:"namespace"` FleetId string `json:"fleet_id"` InstanceId string `json:"instance_id"` MachineVersion string `json:"machine_version"` Node string `json:"node"` Region string `json:"region"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DestroyedAt *time.Time `json:"destroyed_at"` }
type MachineInstance ¶
type MachineInstance struct { Id string `json:"id"` Node string `json:"node"` Namespace string `json:"namespace"` MachineId string `json:"machine_id"` MachineVersion string `json:"machine_version"` Status api.MachineStatus `json:"status"` Events []api.MachineEvent `json:"events"` LocalIPV4 string `json:"local_ipv4"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type PutMachineOptions ¶
type PutMachineOptions struct { Machine Machine `json:"machine"` Version api.MachineVersion `json:"version"` AllocationId string `json:"allocation_id"` Start bool `json:"start"` }
Click to show internal directories.
Click to hide internal directories.