container

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

func New

func New(
	id ID,
	name string,
	logPath string,
) (*Container, error)

func (*Container) CreatedAt

func (c *Container) CreatedAt() string

func (*Container) CreatedAtNano

func (c *Container) CreatedAtNano() int64

func (*Container) ExitCode added in v0.0.2

func (c *Container) ExitCode() int32

func (*Container) FinishedAt

func (c *Container) FinishedAt() string

func (*Container) FinishedAtNano

func (c *Container) FinishedAtNano() int64

func (*Container) ID

func (c *Container) ID() ID

func (*Container) LogPath added in v0.0.2

func (c *Container) LogPath() string

func (*Container) MarshalJSON

func (c *Container) MarshalJSON() ([]byte, error)

func (*Container) Name

func (c *Container) Name() string

func (*Container) SetCreatedAt added in v0.0.2

func (c *Container) SetCreatedAt(t time.Time) error

func (*Container) SetExitCode added in v0.0.2

func (c *Container) SetExitCode(code int32)

func (*Container) SetFinishedAt added in v0.0.2

func (c *Container) SetFinishedAt(t time.Time) error

func (*Container) SetStartedAt added in v0.0.2

func (c *Container) SetStartedAt(t time.Time) error

func (*Container) SetStatus

func (c *Container) SetStatus(s Status)

func (*Container) StartedAt

func (c *Container) StartedAt() string

func (*Container) StartedAtNano

func (c *Container) StartedAtNano() int64

func (*Container) Status

func (c *Container) Status() Status

func (*Container) UnmarshalJSON

func (c *Container) UnmarshalJSON(bytes []byte) error

type ID

type ID string

func ParseID

func ParseID(id string) (ID, error)

func RandID

func RandID() ID

type Map

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

func NewMap

func NewMap() *Map

func (*Map) Add

func (m *Map) Add(c *Container, rb *rollback.Rollback) error

func (*Map) All

func (m *Map) All() (cs []*Container)

func (*Map) Del

func (m *Map) Del(id ID) bool

func (*Map) Get

func (m *Map) Get(id ID) *Container

func (*Map) GetByName

func (m *Map) GetByName(name string) *Container

type Status

type Status uint32
const (
	Initial Status = 0
	Created Status = 10
	Running Status = 20
	Stopped Status = 30
	Unknown Status = math.MaxUint32
)

func StatusFromString

func StatusFromString(s string) (Status, error)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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