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

store

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	NotFound(err error) bool
	Put(ctx context.Context, data map[string]string) error
	Delete(ctx context.Context, keys []string) error
	GetMulti(ctx context.Context, keys []string) (map[string]string, error)
	GetPrefix(ctx context.Context, prefix string, limit int64) (map[string]string, error)
	ListPrefix(ctx context.Context, prefix string) ([]string, error)

	GetServiceStatus(context.Context) ([]string, error)
	ServiceStatusStream(context.Context) chan []string
	RegisterService(context.Context, string, time.Duration) (<-chan struct{}, func(), error)

	StartEphemeral(ctx context.Context, path string, heartbeat time.Duration) (<-chan struct{}, func(), error)

	AddPod(ctx context.Context, name, desc string) (*types.Pod, error)
	GetPod(ctx context.Context, podname string) (*types.Pod, error)
	RemovePod(ctx context.Context, podname string) error
	GetAllPods(ctx context.Context) ([]*types.Pod, error)

	AddNode(context.Context, *types.AddNodeOptions) (*types.Node, error)
	RemoveNode(ctx context.Context, node *types.Node) error
	GetNode(ctx context.Context, nodename string) (*types.Node, error)
	GetNodes(ctx context.Context, nodenames []string) ([]*types.Node, error)
	GetNodesByPod(ctx context.Context, nodeFilter *types.NodeFilter, withoutEngine bool) ([]*types.Node, error)
	UpdateNodes(context.Context, ...*types.Node) error
	SetNodeStatus(ctx context.Context, node *types.Node, ttl int64) error
	GetNodeStatus(ctx context.Context, nodename string) (*types.NodeStatus, error)
	NodeStatusStream(ctx context.Context) chan *types.NodeStatus

	AddWorkload(context.Context, *types.Workload, *types.Processing) error
	UpdateWorkload(ctx context.Context, workload *types.Workload) error
	RemoveWorkload(ctx context.Context, workload *types.Workload) error
	GetWorkload(ctx context.Context, ID string) (*types.Workload, error)
	GetWorkloads(ctx context.Context, IDs []string) ([]*types.Workload, error)
	SetWorkloadStatus(ctx context.Context, status *types.StatusMeta, ttl int64) error
	ListWorkloads(ctx context.Context, appname, entrypoint, nodename string, limit int64, labels map[string]string) ([]*types.Workload, error)
	ListNodeWorkloads(ctx context.Context, nodename string, labels map[string]string) ([]*types.Workload, error)
	WorkloadStatusStream(ctx context.Context, appname, entrypoint, nodename string, labels map[string]string) chan *types.WorkloadStatus

	GetDeployStatus(ctx context.Context, appname, entryname string) (map[string]int, error)

	CreateProcessing(ctx context.Context, process *types.Processing, count int) error
	DeleteProcessing(context.Context, *types.Processing) error

	CreateLock(key string, ttl time.Duration) (lock.DistributedLock, error)
}

Store persists eru cluster metadata.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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