inmemorytaskdb

package
v0.0.0-...-90deddd Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InmemoryTaskDB

type InmemoryTaskDB struct {
	taskdb.TaskDB
	// contains filtered or unexported fields
}

func GetInmemoryTaskDB

func GetInmemoryTaskDB(tableName, repoName string) *InmemoryTaskDB

func NewInmemoryTaskDB

func NewInmemoryTaskDB(tableName, repoName string) *InmemoryTaskDB

func (*InmemoryTaskDB) CreateRun

func (t *InmemoryTaskDB) CreateRun(ctx context.Context, id taskdb.RunID, user string) error

func (*InmemoryTaskDB) CreateTask

func (t *InmemoryTaskDB) CreateTask(ctx context.Context, task taskdb.Task) error

CreateTask creates a new task in the taskdb with the provided task.

func (*InmemoryTaskDB) KeepRunAlive

func (t *InmemoryTaskDB) KeepRunAlive(ctx context.Context, id taskdb.RunID, keepalive time.Time) error

func (*InmemoryTaskDB) KeepTaskAlive

func (t *InmemoryTaskDB) KeepTaskAlive(ctx context.Context, id taskdb.TaskID, keepalive time.Time) error

func (*InmemoryTaskDB) NumCalls

func (t *InmemoryTaskDB) NumCalls(callType string) int

func (*InmemoryTaskDB) Repository

func (t *InmemoryTaskDB) Repository() reflow.Repository

func (*InmemoryTaskDB) SetRunAttrs

func (t *InmemoryTaskDB) SetRunAttrs(ctx context.Context, id taskdb.RunID, bundle digest.Digest, args []string) error

func (*InmemoryTaskDB) SetRunComplete

func (t *InmemoryTaskDB) SetRunComplete(ctx context.Context, id taskdb.RunID, runlog, evalGraph, trace digest.Digest, end time.Time) error

func (*InmemoryTaskDB) SetTaskAttrs

func (t *InmemoryTaskDB) SetTaskAttrs(ctx context.Context, id taskdb.TaskID, stdout, stderr, inspect digest.Digest) error

func (*InmemoryTaskDB) SetTaskComplete

func (t *InmemoryTaskDB) SetTaskComplete(ctx context.Context, id taskdb.TaskID, err error, end time.Time) error

SetTaskComplete mark the task as completed as of the given end time with the error (if any)

func (*InmemoryTaskDB) SetTaskResult

func (t *InmemoryTaskDB) SetTaskResult(ctx context.Context, id taskdb.TaskID, result digest.Digest) error

SetTaskResult sets the result of the task post completion.

func (*InmemoryTaskDB) SetTaskUri

func (t *InmemoryTaskDB) SetTaskUri(ctx context.Context, id taskdb.TaskID, uri string) error

SetTaskUri updates the task URI.

func (*InmemoryTaskDB) Tasks

func (t *InmemoryTaskDB) Tasks(ctx context.Context, taskQuery taskdb.TaskQuery) ([]taskdb.Task, error)

type TaskDB

func (*TaskDB) Flags

func (t *TaskDB) Flags(flags *flag.FlagSet)

Flags implements infra.Provider.

func (*TaskDB) Init

func (t *TaskDB) Init() error

Init implements infra.Provider

Jump to

Keyboard shortcuts

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