model

package
v0.0.0-...-e1467f5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerMetrics

type ContainerMetrics struct {
	Running int
	Paused  int
	Stopped int
}

ContainerMetrics holds the counts for serveral container states

type NodeMetrics

type NodeMetrics struct {
	ID            string
	Host          string
	Role          swarm.NodeRole
	Os            string
	Architecture  string
	Availability  string
	EngineVersion string
	NodeStatus    string
	Resources     Resources
	ManagerInfo   managerInfo
}

NodeMetrics contains all node metrics for easy exporting

func (NodeMetrics) IsLeader

func (nm NodeMetrics) IsLeader() string

IsLeader get the bool if a node is a manager, if ManagerInfo != nil

func (NodeMetrics) ManagerReachability

func (nm NodeMetrics) ManagerReachability() string

ManagerReachability get the manager reachability if ManagerInfo != nil

type Resources

type Resources struct {
	NanoCPUs    int64
	MemoryBytes int64
}

func (Resources) ToNormalCPU

func (r Resources) ToNormalCPU() float64

type ServiceMetrics

type ServiceMetrics struct {
	Name        string
	ServiceMode string
	Container   string
	Limits      Resources
	Reservation Resources
	TimeCreated int64
	TimeUpdated int64
	Replicas    float64
}

ServiceMetrics contains all service metrics for easy exporting

type SwarmMetrics

type SwarmMetrics struct {
	ID        string
	Container ContainerMetrics
	NCPU      int
	Memory    int64
	Images    int
}

SwarmMetrics contains generic swarm metrics

func (SwarmMetrics) GetSanitizedID

func (sm SwarmMetrics) GetSanitizedID() string

GetSanitizedID sanitizes the swarm id

Jump to

Keyboard shortcuts

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