Documentation
¶
Index ¶
- type Calcium
- func (c *Calcium) AddNode(ctx context.Context, opts *types.AddNodeOptions) (*types.Node, error)
- func (c *Calcium) AddPod(ctx context.Context, podname, desc string) (*types.Pod, error)
- func (c *Calcium) BuildImage(ctx context.Context, opts *types.BuildOptions) (chan *types.BuildImageMessage, error)
- func (c *Calcium) CacheImage(ctx context.Context, opts *types.ImageOptions) (chan *types.CacheImageMessage, error)
- func (c *Calcium) CalculateCapacity(ctx context.Context, opts *types.DeployOptions) (*types.CapacityMessage, error)
- func (c *Calcium) ConnectNetwork(ctx context.Context, network, target, ipv4, ipv6 string) ([]string, error)
- func (c *Calcium) ControlWorkload(ctx context.Context, IDs []string, typ string, force bool) (chan *types.ControlWorkloadMessage, error)
- func (c *Calcium) Copy(ctx context.Context, opts *types.CopyOptions) (chan *types.CopyMessage, error)
- func (c *Calcium) CreateWorkload(ctx context.Context, opts *types.DeployOptions) (chan *types.CreateWorkloadMessage, error)
- func (c *Calcium) DisasterRecover(ctx context.Context)
- func (c *Calcium) DisconnectNetwork(ctx context.Context, network, target string, force bool) error
- func (c *Calcium) DissociateWorkload(ctx context.Context, IDs []string) (chan *types.DissociateWorkloadMessage, error)
- func (c *Calcium) ExecuteWorkload(ctx context.Context, opts *types.ExecuteWorkloadOptions, inCh <-chan []byte) chan *types.AttachWorkloadMessage
- func (c *Calcium) Finalizer()
- func (c *Calcium) GetIdentifier() string
- func (c *Calcium) GetNode(ctx context.Context, nodename string) (node *types.Node, err error)
- func (c *Calcium) GetNodeEngineInfo(ctx context.Context, nodename string) (*enginetypes.Info, error)
- func (c *Calcium) GetNodeStatus(ctx context.Context, nodename string) (*types.NodeStatus, error)
- func (c *Calcium) GetPod(ctx context.Context, podname string) (*types.Pod, error)
- func (c *Calcium) GetStore() store.Store
- func (c *Calcium) GetWAL() wal.WAL
- func (c *Calcium) GetWorkload(ctx context.Context, ID string) (workload *types.Workload, err error)
- func (c *Calcium) GetWorkloads(ctx context.Context, IDs []string) (workloads []*types.Workload, err error)
- func (c *Calcium) GetWorkloadsStatus(ctx context.Context, IDs []string) ([]*types.StatusMeta, error)
- func (c *Calcium) InitMetrics(ctx context.Context)
- func (c *Calcium) ListImage(ctx context.Context, opts *types.ImageOptions) (chan *types.ListImageMessage, error)
- func (c *Calcium) ListNetworks(ctx context.Context, podname, driver string) ([]*enginetypes.Network, error)
- func (c *Calcium) ListNodeWorkloads(ctx context.Context, nodename string, labels map[string]string) (workloads []*types.Workload, err error)
- func (c *Calcium) ListPodNodes(ctx context.Context, opts *types.ListNodesOptions) (<-chan *types.Node, error)
- func (c *Calcium) ListPods(ctx context.Context) ([]*types.Pod, error)
- func (c *Calcium) ListWorkloads(ctx context.Context, opts *types.ListWorkloadsOptions) (workloads []*types.Workload, err error)
- func (c *Calcium) LogStream(ctx context.Context, opts *types.LogStreamOptions) (chan *types.LogStreamMessage, error)
- func (c *Calcium) NodeResource(ctx context.Context, nodename string, fix bool) (*types.NodeResourceInfo, error)
- func (c *Calcium) NodeStatusStream(ctx context.Context) chan *types.NodeStatus
- func (c *Calcium) PodResource(ctx context.Context, podname string) (chan *types.NodeResourceInfo, error)
- func (c *Calcium) RawEngine(ctx context.Context, opts *types.RawEngineOptions) (msg *types.RawEngineMessage, err error)
- func (c *Calcium) ReallocResource(ctx context.Context, opts *types.ReallocOptions) (err error)
- func (c *Calcium) RegisterService(ctx context.Context) (unregister func(), err error)
- func (c *Calcium) RemapResourceAndLog(ctx context.Context, logger *log.Fields, node *types.Node)
- func (c *Calcium) RemoveImage(ctx context.Context, opts *types.ImageOptions) (chan *types.RemoveImageMessage, error)
- func (c *Calcium) RemoveNode(ctx context.Context, nodename string) error
- func (c *Calcium) RemovePod(ctx context.Context, podname string) error
- func (c *Calcium) RemoveWorkload(ctx context.Context, IDs []string, force bool) (chan *types.RemoveWorkloadMessage, error)
- func (c *Calcium) ReplaceWorkload(ctx context.Context, opts *types.ReplaceOptions) (chan *types.ReplaceWorkloadMessage, error)
- func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inCh <-chan []byte) ([]string, <-chan *types.AttachWorkloadMessage, error)
- func (c *Calcium) Send(ctx context.Context, opts *types.SendOptions) (chan *types.SendMessage, error)
- func (c *Calcium) SendLargeFile(ctx context.Context, inputChan chan *types.SendLargeFileOptions) chan *types.SendMessage
- func (c *Calcium) SetNode(ctx context.Context, opts *types.SetNodeOptions) (*types.Node, error)
- func (c *Calcium) SetNodeStatus(ctx context.Context, nodename string, ttl int64) error
- func (c *Calcium) SetWorkloadsStatus(ctx context.Context, statusMetas []*types.StatusMeta, ttls map[string]int64) ([]*types.StatusMeta, error)
- func (c *Calcium) WatchServiceStatus(ctx context.Context) (<-chan types.ServiceStatus, error)
- func (c *Calcium) WorkloadStatusStream(ctx context.Context, appname, entrypoint, nodename string, ...) chan *types.WorkloadStatus
- type CreateLambdaHandler
- type CreateWorkloadHandler
- type ProcessingCreatedHandler
- type ReallocWorkloadHandler
- type ReplaceWorkloadHandler
- type WorkloadResourceAllocatedHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calcium ¶
type Calcium struct {
// contains filtered or unexported fields
}
Calcium implements the cluster.Cluster interface.
func New ¶
func New(ctx context.Context, config types.Config, embeddedETCD *embedded.Cluster) (*Calcium, error)
New returns a Calcium cluster.
func (*Calcium) BuildImage ¶
func (c *Calcium) BuildImage(ctx context.Context, opts *types.BuildOptions) (chan *types.BuildImageMessage, error)
func (*Calcium) CacheImage ¶
func (c *Calcium) CacheImage(ctx context.Context, opts *types.ImageOptions) (chan *types.CacheImageMessage, error)
func (*Calcium) CalculateCapacity ¶
func (c *Calcium) CalculateCapacity(ctx context.Context, opts *types.DeployOptions) (*types.CapacityMessage, error)
func (*Calcium) ConnectNetwork ¶
func (*Calcium) ControlWorkload ¶
func (*Calcium) Copy ¶
func (c *Calcium) Copy(ctx context.Context, opts *types.CopyOptions) (chan *types.CopyMessage, error)
func (*Calcium) CreateWorkload ¶
func (c *Calcium) CreateWorkload(ctx context.Context, opts *types.DeployOptions) (chan *types.CreateWorkloadMessage, error)
func (*Calcium) DisasterRecover ¶
DisasterRecover replays the WAL to finish interrupted writes.
func (*Calcium) DisconnectNetwork ¶
func (*Calcium) DissociateWorkload ¶
func (*Calcium) ExecuteWorkload ¶
func (c *Calcium) ExecuteWorkload(ctx context.Context, opts *types.ExecuteWorkloadOptions, inCh <-chan []byte) chan *types.AttachWorkloadMessage
func (*Calcium) GetIdentifier ¶
func (*Calcium) GetNodeEngineInfo ¶
func (*Calcium) GetNodeStatus ¶
func (*Calcium) GetWorkload ¶
func (*Calcium) GetWorkloads ¶
func (*Calcium) GetWorkloadsStatus ¶
func (*Calcium) InitMetrics ¶
InitMetrics registers resource plugin metric descriptions and starts the metrics client.
func (*Calcium) ListImage ¶
func (c *Calcium) ListImage(ctx context.Context, opts *types.ImageOptions) (chan *types.ListImageMessage, error)
func (*Calcium) ListNetworks ¶
func (*Calcium) ListNodeWorkloads ¶
func (*Calcium) ListPodNodes ¶
func (*Calcium) ListWorkloads ¶
func (*Calcium) LogStream ¶
func (c *Calcium) LogStream(ctx context.Context, opts *types.LogStreamOptions) (chan *types.LogStreamMessage, error)
func (*Calcium) NodeResource ¶
func (*Calcium) NodeStatusStream ¶
func (c *Calcium) NodeStatusStream(ctx context.Context) chan *types.NodeStatus
func (*Calcium) PodResource ¶
func (*Calcium) RawEngine ¶
func (c *Calcium) RawEngine(ctx context.Context, opts *types.RawEngineOptions) (msg *types.RawEngineMessage, err error)
func (*Calcium) ReallocResource ¶
func (*Calcium) RegisterService ¶
RegisterService registers this core's service address in the store.
func (*Calcium) RemapResourceAndLog ¶
RemapResourceAndLog remaps node resources after a binding change and logs the outcome.
func (*Calcium) RemoveImage ¶
func (c *Calcium) RemoveImage(ctx context.Context, opts *types.ImageOptions) (chan *types.RemoveImageMessage, error)
func (*Calcium) RemoveNode ¶
func (*Calcium) RemoveWorkload ¶
func (*Calcium) ReplaceWorkload ¶
func (c *Calcium) ReplaceWorkload(ctx context.Context, opts *types.ReplaceOptions) (chan *types.ReplaceWorkloadMessage, error)
func (*Calcium) RunAndWait ¶
func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inCh <-chan []byte) ([]string, <-chan *types.AttachWorkloadMessage, error)
func (*Calcium) Send ¶
func (c *Calcium) Send(ctx context.Context, opts *types.SendOptions) (chan *types.SendMessage, error)
func (*Calcium) SendLargeFile ¶
func (c *Calcium) SendLargeFile(ctx context.Context, inputChan chan *types.SendLargeFileOptions) chan *types.SendMessage
func (*Calcium) SetNodeStatus ¶
func (*Calcium) SetWorkloadsStatus ¶
func (c *Calcium) SetWorkloadsStatus(ctx context.Context, statusMetas []*types.StatusMeta, ttls map[string]int64) ([]*types.StatusMeta, error)
func (*Calcium) WatchServiceStatus ¶
func (*Calcium) WorkloadStatusStream ¶
type CreateLambdaHandler ¶
type CreateLambdaHandler struct {
// contains filtered or unexported fields
}
CreateLambdaHandler waits for a replayed lambda workload and removes it.
func (*CreateLambdaHandler) Handle ¶
func (h *CreateLambdaHandler) Handle(ctx context.Context, raw any) error
func (*CreateLambdaHandler) Typ ¶
func (h *CreateLambdaHandler) Typ() string
type CreateWorkloadHandler ¶
type CreateWorkloadHandler struct {
// contains filtered or unexported fields
}
CreateWorkloadHandler removes a workload left behind by an interrupted create.
func (*CreateWorkloadHandler) Handle ¶
func (h *CreateWorkloadHandler) Handle(ctx context.Context, raw any) error
func (*CreateWorkloadHandler) Typ ¶
func (h *CreateWorkloadHandler) Typ() string
type ProcessingCreatedHandler ¶
type ProcessingCreatedHandler struct {
// contains filtered or unexported fields
}
ProcessingCreatedHandler deletes processing records left by an interrupted deploy.
func (*ProcessingCreatedHandler) Handle ¶
func (h *ProcessingCreatedHandler) Handle(ctx context.Context, raw any) (err error)
func (*ProcessingCreatedHandler) Typ ¶
func (h *ProcessingCreatedHandler) Typ() string
type ReallocWorkloadHandler ¶ added in v0.1.1
type ReallocWorkloadHandler struct {
// contains filtered or unexported fields
}
ReallocWorkloadHandler re-applies the stored engine params of an interrupted realloc.
func (*ReallocWorkloadHandler) Handle ¶ added in v0.1.1
func (h *ReallocWorkloadHandler) Handle(ctx context.Context, raw any) error
func (*ReallocWorkloadHandler) Typ ¶ added in v0.1.1
func (h *ReallocWorkloadHandler) Typ() string
type ReplaceWorkloadHandler ¶ added in v0.1.1
type ReplaceWorkloadHandler struct {
// contains filtered or unexported fields
}
ReplaceWorkloadHandler removes the workload an interrupted replace left behind.
func (*ReplaceWorkloadHandler) Handle ¶ added in v0.1.1
func (h *ReplaceWorkloadHandler) Handle(ctx context.Context, raw any) error
func (*ReplaceWorkloadHandler) Typ ¶ added in v0.1.1
func (h *ReplaceWorkloadHandler) Typ() string
type WorkloadResourceAllocatedHandler ¶
type WorkloadResourceAllocatedHandler struct {
// contains filtered or unexported fields
}
WorkloadResourceAllocatedHandler replays a dangling resource allocation by refreshing node resources.
func (*WorkloadResourceAllocatedHandler) Handle ¶
func (h *WorkloadResourceAllocatedHandler) Handle(ctx context.Context, raw any) error
func (*WorkloadResourceAllocatedHandler) Typ ¶
func (h *WorkloadResourceAllocatedHandler) Typ() string