qframe_inventory

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerRequest added in v0.2.0

type ContainerRequest struct {
	IssuedAt time.Time
	Source   string
	Timeout  time.Duration
	Name     string
	ID       string
	IP       string
	Back     chan Response
}

func NewContainerRequest added in v0.2.0

func NewContainerRequest(src string, to time.Duration) ContainerRequest

func NewIDContainerRequest added in v0.2.0

func NewIDContainerRequest(src, id string) ContainerRequest

func NewIPContainerRequest added in v0.2.0

func NewIPContainerRequest(src, ip string) ContainerRequest

func NewNameContainerRequest added in v0.2.0

func NewNameContainerRequest(src, name string) ContainerRequest

func (ContainerRequest) Equal added in v0.2.0

func (this ContainerRequest) Equal(other types.ContainerJSON) bool

func (*ContainerRequest) TimedOut added in v0.2.1

func (cr *ContainerRequest) TimedOut() bool

type Inventory

type Inventory struct {
	Version         string
	Data            map[string]types.ContainerJSON
	PendingRequests []ContainerRequest
	// contains filtered or unexported fields
}

func NewInventory

func NewInventory() Inventory

func (*Inventory) CheckRequests

func (inv *Inventory) CheckRequests()

CheckRequests iterates over all requests and responses if the request can be fulfilled

func (*Inventory) GetItem

func (i *Inventory) GetItem(key string) (cntOut types.ContainerJSON, err error)

func (*Inventory) HandleRequest

func (i *Inventory) HandleRequest(req ContainerRequest) (err error)

func (*Inventory) ServeRequest

func (i *Inventory) ServeRequest(req ContainerRequest)

func (*Inventory) SetItem

func (i *Inventory) SetItem(key string, item types.ContainerJSON) (err error)

type Response added in v0.2.1

type Response struct {
	Container types.ContainerJSON
	Error     error
}

func NewFAILResponse added in v0.2.1

func NewFAILResponse(err error) Response

func NewOKResponse added in v0.2.1

func NewOKResponse(cnt types.ContainerJSON) Response

Jump to

Keyboard shortcuts

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