comm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NetStatsNames = []string{
	"collisions",
	"multicast",
	"rx_bytes",
	"rx_compressed",
	"rx_crc_errors",
	"rx_dropped",
	"rx_fifo_errors",
	"rx_frame_errors",
	"rx_length_errors",
	"rx_missed_errors",
	"rx_over_errors",
	"rx_packets",
	"tx_aborted_errors",
	"tx_bytes",
	"tx_carrier_errors",
	"tx_compressed",
	"tx_dropped",
	"tx_errors",
	"tx_fifo_errors",
	"tx_heartbeat_errors",
	"tx_packets",
	"tx_window_errors",
}

Functions

func BuildNetworkIntPath

func BuildNetworkIntPath(netIntName, statName string) string

func NewDockerClientSamalba

func NewDockerClientSamalba() (cli *dsamalba.DockerClient, err error)

Types

type Container

type Container struct {
	ID                int `json:"-"`
	PID               int `json:"-",sql:"-"`
	DockerID          string
	Name              string
	NodeName          string
	NetworkInterfaces []NetworkInterface
	IsActive          bool `sql:"-"`
	CreatedAt         time.Time
	UpdatedAt         time.Time
	DeletedAt         *time.Time
}

func (*Container) AddNewInterfaces

func (cont *Container) AddNewInterfaces(newNetInterfaces []NetworkInterface)

func (*Container) UpdateLastValue

func (cont *Container) UpdateLastValue()

func (*Container) UpdateNetInterfaces

func (cont *Container) UpdateNetInterfaces()

type Docker

type Docker struct {
	*d.Client
}

func NewDockerClient

func NewDockerClient() (cli Docker, err error)

type NetworkInterface

type NetworkInterface struct {
	ID           int `json:"-"`
	ContainerID  int `json:"-",sql:"index"`
	Name         string
	IsActive     bool `json:"-"`
	NetworkStats []NetworkStat
}

type NetworkStat

type NetworkStat struct {
	ID                 int `json:"-"`
	NetworkInterfaceID int `json:"-",sql:"index"`
	Name               string
	ExecID             string `json:"-",sql:"-"`
	ValueRead          int64  `json:"-",sql:"-"`
	LastValueRead      int64  `json:"-",sql:"-"`
	CurrentValue       int64
}

type Node

type Node struct {
	//	NumberOfActCont int
	Name         string
	DockerClient Docker `json:"-",sql:"-"`
	CreatedAt    time.Time
	UpdatedAt    time.Time
	DeletedAt    *time.Time
	Containers   []Container
}

func (*Node) Activate

func (n *Node) Activate(dockerID, dockerPID string)

func (*Node) ActiveContainers

func (n *Node) ActiveContainers() int

func (*Node) Create

func (n *Node) Create(dockerID string) error

func (*Node) Deactivate

func (n *Node) Deactivate(dockerID string) bool

func (*Node) GetSliceIndex

func (n *Node) GetSliceIndex(dockerID string) int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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