jobstatus

package
v0.0.0-...-47977ad Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Storage stores information about something

func NewStorage

func NewStorage() *Storage

NewStorage creates a new in-memory storage

func (*Storage) FindByID

func (s *Storage) FindByID(id string) virtualmachine.TaskStatuser

func (*Storage) NewTask

func (s *Storage) NewTask() virtualmachine.TaskStatuser

NewTask creates a new unique status for a task

type TaskStatus

type TaskStatus struct {
	sync.RWMutex

	Status  map[string]interface{}
	Created time.Time
	// contains filtered or unexported fields
}

TaskStatus keep status messages and other metadata of task

func (*TaskStatus) Get

func (t *TaskStatus) Get() (statuses map[string]interface{})

Get status messages from a task

func (*TaskStatus) ID

func (t *TaskStatus) ID() string

Id returns task Id

func (*TaskStatus) Str

func (t *TaskStatus) Str(keyvals ...string) virtualmachine.TaskStatuser

Str a key-value pairs to a task status message

func (*TaskStatus) StrArr

func (t *TaskStatus) StrArr(key string, arr []string) virtualmachine.TaskStatuser

StrArr a key-value pairs to a task status message

Jump to

Keyboard shortcuts

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