Help us shape the future of Go! Take the 2026 Go Developer Survey

calcium

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 41 Imported by: 0

Documentation

Index

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) AddNode

func (c *Calcium) AddNode(ctx context.Context, opts *types.AddNodeOptions) (*types.Node, error)

func (*Calcium) AddPod

func (c *Calcium) AddPod(ctx context.Context, podname, desc string) (*types.Pod, error)

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 (c *Calcium) ConnectNetwork(ctx context.Context, network, target, ipv4, ipv6 string) ([]string, error)

func (*Calcium) ControlWorkload

func (c *Calcium) ControlWorkload(ctx context.Context, IDs []string, typ string, force bool) (chan *types.ControlWorkloadMessage, error)

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

func (c *Calcium) DisasterRecover(ctx context.Context)

DisasterRecover replays the WAL to finish interrupted writes.

func (*Calcium) DisconnectNetwork

func (c *Calcium) DisconnectNetwork(ctx context.Context, network, target string, force bool) error

func (*Calcium) DissociateWorkload

func (c *Calcium) DissociateWorkload(ctx context.Context, IDs []string) (chan *types.DissociateWorkloadMessage, error)

func (*Calcium) ExecuteWorkload

func (c *Calcium) ExecuteWorkload(ctx context.Context, opts *types.ExecuteWorkloadOptions, inCh <-chan []byte) chan *types.AttachWorkloadMessage

func (*Calcium) Finalizer

func (c *Calcium) Finalizer()

func (*Calcium) GetIdentifier

func (c *Calcium) GetIdentifier() string

func (*Calcium) GetNode

func (c *Calcium) GetNode(ctx context.Context, nodename string) (node *types.Node, err error)

func (*Calcium) GetNodeEngineInfo

func (c *Calcium) GetNodeEngineInfo(ctx context.Context, nodename string) (*enginetypes.Info, error)

func (*Calcium) GetNodeStatus

func (c *Calcium) GetNodeStatus(ctx context.Context, nodename string) (*types.NodeStatus, error)

func (*Calcium) GetPod

func (c *Calcium) GetPod(ctx context.Context, podname string) (*types.Pod, error)

func (*Calcium) GetStore

func (c *Calcium) GetStore() store.Store

func (*Calcium) GetWAL added in v0.1.1

func (c *Calcium) GetWAL() wal.WAL

func (*Calcium) GetWorkload

func (c *Calcium) GetWorkload(ctx context.Context, ID string) (workload *types.Workload, err error)

func (*Calcium) GetWorkloads

func (c *Calcium) GetWorkloads(ctx context.Context, IDs []string) (workloads []*types.Workload, err error)

func (*Calcium) GetWorkloadsStatus

func (c *Calcium) GetWorkloadsStatus(ctx context.Context, IDs []string) ([]*types.StatusMeta, error)

func (*Calcium) InitMetrics

func (c *Calcium) InitMetrics(ctx context.Context)

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 (c *Calcium) ListNetworks(ctx context.Context, podname, driver string) ([]*enginetypes.Network, error)

func (*Calcium) ListNodeWorkloads

func (c *Calcium) ListNodeWorkloads(ctx context.Context, nodename string, labels map[string]string) (workloads []*types.Workload, err error)

func (*Calcium) ListPodNodes

func (c *Calcium) ListPodNodes(ctx context.Context, opts *types.ListNodesOptions) (<-chan *types.Node, error)

func (*Calcium) ListPods

func (c *Calcium) ListPods(ctx context.Context) ([]*types.Pod, error)

func (*Calcium) ListWorkloads

func (c *Calcium) ListWorkloads(ctx context.Context, opts *types.ListWorkloadsOptions) (workloads []*types.Workload, err error)

func (*Calcium) LogStream

func (c *Calcium) LogStream(ctx context.Context, opts *types.LogStreamOptions) (chan *types.LogStreamMessage, error)

func (*Calcium) NodeResource

func (c *Calcium) NodeResource(ctx context.Context, nodename string, fix bool) (*types.NodeResourceInfo, error)

func (*Calcium) NodeStatusStream

func (c *Calcium) NodeStatusStream(ctx context.Context) chan *types.NodeStatus

func (*Calcium) PodResource

func (c *Calcium) PodResource(ctx context.Context, podname string) (chan *types.NodeResourceInfo, error)

func (*Calcium) RawEngine

func (c *Calcium) RawEngine(ctx context.Context, opts *types.RawEngineOptions) (msg *types.RawEngineMessage, err error)

func (*Calcium) ReallocResource

func (c *Calcium) ReallocResource(ctx context.Context, opts *types.ReallocOptions) (err error)

func (*Calcium) RegisterService

func (c *Calcium) RegisterService(ctx context.Context) (unregister func(), err error)

RegisterService registers this core's service address in the store.

func (*Calcium) RemapResourceAndLog

func (c *Calcium) RemapResourceAndLog(ctx context.Context, logger *log.Fields, nodename string)

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 (c *Calcium) RemoveNode(ctx context.Context, nodename string) error

func (*Calcium) RemovePod

func (c *Calcium) RemovePod(ctx context.Context, podname string) error

func (*Calcium) RemoveWorkload

func (c *Calcium) RemoveWorkload(ctx context.Context, IDs []string, force bool) (chan *types.RemoveWorkloadMessage, error)

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) SetNode

func (c *Calcium) SetNode(ctx context.Context, opts *types.SetNodeOptions) (*types.Node, error)

func (*Calcium) SetNodeStatus

func (c *Calcium) SetNodeStatus(ctx context.Context, nodename string, ttl int64) error

func (*Calcium) SetWorkloadsStatus

func (c *Calcium) SetWorkloadsStatus(ctx context.Context, statusMetas []*types.StatusMeta, ttls map[string]int64) ([]*types.StatusMeta, error)

func (*Calcium) WatchServiceStatus

func (c *Calcium) WatchServiceStatus(ctx context.Context) (<-chan types.ServiceStatus, error)

func (*Calcium) WorkloadStatusStream

func (c *Calcium) WorkloadStatusStream(ctx context.Context, appname, entrypoint, nodename string, labels map[string]string) chan *types.WorkloadStatus

type CreateLambdaHandler

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

CreateLambdaHandler waits for a replayed lambda workload and removes it.

func (*CreateLambdaHandler) Decode

func (h *CreateLambdaHandler) Decode(bs []byte) (any, error)

func (*CreateLambdaHandler) Encode

func (h *CreateLambdaHandler) Encode(raw any) ([]byte, error)

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) Decode

func (CreateWorkloadHandler) Decode(bs []byte) (any, error)

func (CreateWorkloadHandler) Encode

func (CreateWorkloadHandler) Encode(raw any) ([]byte, error)

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) Decode

func (ProcessingCreatedHandler) Decode(bs []byte) (any, error)

func (ProcessingCreatedHandler) Encode

func (ProcessingCreatedHandler) Encode(raw any) ([]byte, error)

func (*ProcessingCreatedHandler) Handle

func (h *ProcessingCreatedHandler) Handle(ctx context.Context, raw any) (err error)

func (*ProcessingCreatedHandler) Typ

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) Decode added in v0.1.1

func (ReallocWorkloadHandler) Decode(bs []byte) (any, error)

func (ReallocWorkloadHandler) Encode added in v0.1.1

func (ReallocWorkloadHandler) Encode(raw any) ([]byte, error)

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) Decode added in v0.1.1

func (ReplaceWorkloadHandler) Decode(bs []byte) (any, error)

func (ReplaceWorkloadHandler) Encode added in v0.1.1

func (ReplaceWorkloadHandler) Encode(raw any) ([]byte, error)

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) Decode

func (WorkloadResourceAllocatedHandler) Decode(bs []byte) (any, error)

func (WorkloadResourceAllocatedHandler) Encode

func (WorkloadResourceAllocatedHandler) Encode(raw any) ([]byte, error)

func (*WorkloadResourceAllocatedHandler) Handle

func (*WorkloadResourceAllocatedHandler) Typ

Jump to

Keyboard shortcuts

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