metastore

package
v0.4.0-beta Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemoryMeta   = config.MemoryMeta
	SqliteMeta   = config.SqliteMeta
	PostgresMeta = config.PostgresMeta
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkStore

type ChunkStore interface {
	NextSegmentID(ctx context.Context) (int64, error)
	ListSegments(ctx context.Context, oid, chunkID int64, allChunk bool) ([]types.ChunkSeg, error)
	AppendSegments(ctx context.Context, seg types.ChunkSeg) (*types.Object, error)
	DeleteSegment(ctx context.Context, segID int64) error
}

type Iterator

type Iterator interface {
	HasNext() bool
	Next() *types.Object
}

type Meta

func NewMetaStorage

func NewMetaStorage(metaType string, meta config.Meta) (m Meta, err error)

type ObjectStore

type ObjectStore interface {
	SystemInfo(ctx context.Context) (*types.SystemInfo, error)
	GetObject(ctx context.Context, id int64) (*types.Object, error)
	GetObjectExtendData(ctx context.Context, obj *types.Object) error
	ListObjects(ctx context.Context, filter types.Filter) ([]*types.Object, error)
	SaveObjects(ctx context.Context, obj ...*types.Object) error
	DestroyObject(ctx context.Context, src, obj *types.Object) error

	ListChildren(ctx context.Context, obj *types.Object) (Iterator, error)
	MirrorObject(ctx context.Context, srcObj, dstParent, object *types.Object) error
	ChangeParent(ctx context.Context, srcParent, dstParent, obj *types.Object, opt types.ChangeParentOption) error
}

type PluginRecorder

type PluginRecorder interface {
	GetRecord(ctx context.Context, rid string, record interface{}) error
	ListRecords(ctx context.Context, groupId string) ([]string, error)
	SaveRecord(ctx context.Context, groupId, rid string, record interface{}) error
	DeleteRecord(ctx context.Context, rid string) error
}

type PluginRecorderGetter

type PluginRecorderGetter interface {
	PluginRecorder(plugin types.PlugScope) PluginRecorder
}

type ScheduledTaskRecorder

type ScheduledTaskRecorder interface {
	ListTask(ctx context.Context, taskID string, filter types.ScheduledTaskFilter) ([]*types.ScheduledTask, error)
	SaveTask(ctx context.Context, task *types.ScheduledTask) error
	DeleteFinishedTask(ctx context.Context, aliveTime time.Duration) error

	GetWorkflow(ctx context.Context, wfID string) (*types.WorkflowSpec, error)
	ListWorkflow(ctx context.Context) ([]*types.WorkflowSpec, error)
	DeleteWorkflow(ctx context.Context, wfID string) error
	ListWorkflowJob(ctx context.Context, filter types.JobFilter) ([]*types.WorkflowJob, error)
	SaveWorkflow(ctx context.Context, wf *types.WorkflowSpec) error
	SaveWorkflowJob(ctx context.Context, wf *types.WorkflowJob) error
	DeleteWorkflowJob(ctx context.Context, wfJobID ...string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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