persistence

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: GPL-2.0, GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequestIDNotFound = fmt.Errorf("request id not found")
	ErrNoStatusDataToday = fmt.Errorf("no status data today")
	ErrNoStatusData      = fmt.Errorf("no status data")
)

Functions

This section is empty.

Types

type DAGListPaginationArgs

type DAGListPaginationArgs struct {
	Page  int
	Limit int
	Name  string
	Tag   string
}

type DAGStore

type DAGStore interface {
	Create(ctx context.Context, name string, spec []byte) (string, error)
	Delete(ctx context.Context, name string) error
	List(ctx context.Context) (ret []*digraph.DAG, errs []string, err error)
	ListPagination(ctx context.Context, params DAGListPaginationArgs) (*DagListPaginationResult, error)
	GetMetadata(ctx context.Context, name string) (*digraph.DAG, error)
	GetDetails(ctx context.Context, name string) (*digraph.DAG, error)
	Grep(ctx context.Context, pattern string) (ret []*GrepResult, errs []string, err error)
	Rename(ctx context.Context, oldID, newID string) error
	GetSpec(ctx context.Context, name string) (string, error)
	UpdateSpec(ctx context.Context, name string, spec []byte) error
	TagList(ctx context.Context) ([]string, []string, error)
}

type DagListPaginationResult

type DagListPaginationResult struct {
	DagList   []*digraph.DAG
	Count     int
	ErrorList []string
}

type FlagStore

type FlagStore interface {
	ToggleSuspend(id string, suspend bool) error
	IsSuspended(id string) bool
}

type GrepResult

type GrepResult struct {
	Name    string
	DAG     *digraph.DAG
	Matches []*grep.Match
}

type HistoryStore

type HistoryStore interface {
	Open(ctx context.Context, key string, timestamp time.Time, requestID string) error
	Write(ctx context.Context, status model.Status) error
	Close(ctx context.Context) error
	Update(ctx context.Context, key, requestID string, status model.Status) error
	ReadStatusRecent(ctx context.Context, key string, itemLimit int) []model.StatusFile
	ReadStatusToday(ctx context.Context, key string) (*model.Status, error)
	FindByRequestID(ctx context.Context, key string, requestID string) (*model.StatusFile, error)
	RemoveAll(ctx context.Context, key string) error
	RemoveOld(ctx context.Context, key string, retentionDays int) error
	Rename(ctx context.Context, oldKey, newKey string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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