storage

package
v0.0.0-...-094b2d4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProgramExists       = errors.New("program exists")
	ErrProgramDoesNotExist = errors.New("program does not exist")
)

Functions

This section is empty.

Types

type ExecutionLogWriter

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

func NewExecutionLogWriter

func NewExecutionLogWriter(storage *ProgramStorage, name string, resolution int64) *ExecutionLogWriter

func (*ExecutionLogWriter) AddLine

func (writer *ExecutionLogWriter) AddLine(status *types.ExecutionStatus)

func (*ExecutionLogWriter) Close

func (writer *ExecutionLogWriter) Close()

type ProgramStorage

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

func NewProgramStorage

func NewProgramStorage(basePath string) (*ProgramStorage, error)

func (*ProgramStorage) CreateProgram

func (storage *ProgramStorage) CreateProgram(programName string, program *types.Program) error

func (*ProgramStorage) DeleteProgram

func (storage *ProgramStorage) DeleteProgram(programName string) error

func (*ProgramStorage) ListPrograms

func (storage *ProgramStorage) ListPrograms() ([]string, error)

func (*ProgramStorage) LoadProgram

func (storage *ProgramStorage) LoadProgram(programName string) (*types.Program, error)

func (*ProgramStorage) LoadState

func (storage *ProgramStorage) LoadState(name string) (types.ProgramState, int64, error)

Returns saved state and time it was saved.

func (*ProgramStorage) MaybeDeleteExecutionLog

func (storage *ProgramStorage) MaybeDeleteExecutionLog(name string)

func (*ProgramStorage) MaybeDeleteState

func (storage *ProgramStorage) MaybeDeleteState(name string)

type StateWriter

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

func NewStateWriter

func NewStateWriter(storage *ProgramStorage, name string) *StateWriter

func (*StateWriter) UpdateState

func (statusWriter *StateWriter) UpdateState(status types.ProgramState) error

Jump to

Keyboard shortcuts

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