Documentation
¶
Index ¶
- Variables
- type ExecutionLogWriter
- type ProgramStorage
- func (storage *ProgramStorage) CreateProgram(programName string, program *types.Program) error
- func (storage *ProgramStorage) DeleteProgram(programName string) error
- func (storage *ProgramStorage) ListPrograms() ([]string, error)
- func (storage *ProgramStorage) LoadProgram(programName string) (*types.Program, error)
- func (storage *ProgramStorage) LoadState(name string) (types.ProgramState, int64, error)
- func (storage *ProgramStorage) MaybeDeleteExecutionLog(name string)
- func (storage *ProgramStorage) MaybeDeleteState(name string)
- type StateWriter
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
Click to show internal directories.
Click to hide internal directories.