status

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

status used to add and get information such as current deploy progress, deploy error messages, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage added in v0.5.0

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

Storage stores information about something

func NewStorage added in v0.5.0

func NewStorage() *Storage

NewStorage creates a new in-memory storage

func (*Storage) FindByID added in v0.5.0

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

func (*Storage) NewTask added in v0.5.0

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

NewTask creates a new unique status for a task

type TaskStatus added in v0.5.0

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 added in v0.5.0

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

Get status messages from a task

func (*TaskStatus) ID added in v0.5.0

func (t *TaskStatus) ID() string

Id returns task Id

func (*TaskStatus) Str added in v0.5.0

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

Str a key-value pairs to a task status message

func (*TaskStatus) StrArr added in v0.5.0

func (t *TaskStatus) StrArr(key string, arr []string) service.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