Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocatable ¶
type Allocatable struct {
NodeName string `json:"node_name"`
Cpu float64 `json:"cpu"`
Disk uint64 `json:"disk"`
Memory uint64 `json:"memory"`
UpdateTime time.Time `json:"update_time"`
}
Allocatable available resources for node
type AllocatableOption ¶
type AllocatableOption func(a *Allocatable)
AllocatableOption Allocatable's options
type Capacity ¶
type Capacity struct {
NodeName string `json:"node_name"`
Cpu float64 `json:"cpu"`
Disk uint64 `json:"disk"`
Memory uint64 `json:"memory"` //byte
CpuCors int32 `json:"cpu_cors"`
CpuUsage uint8 `json:"cpu_usage"`
MemoryUsage uint8 `json:"memory_usage"`
UpdateTime time.Time `json:"update_time"`
Allocatable *Allocatable
}
type CapacityOption ¶
type CapacityOption func(c *Capacity)
type Node ¶
type Node struct {
Name string `json:"name"`
Role Role `json:"role"`
IP net.IP `json:"ip"`
Version string `json:"version"`
CreateTime time.Time `json:"create_time"`
}
Node is node
type NodeOption ¶
type NodeOption func(s *Node)
NodeOption configure node
func WithNodeVersion ¶
func WithNodeVersion(v string) NodeOption
WithNodeVersion sets node's version
type Role ¶
type Role struct {
Master bool `json:"master"`
Admin bool `json:"admin"`
Worker bool `json:"worker"`
}
Role store struct
type StatusOption ¶
type StatusOption func(s *Status)
func WithCPUPressure ¶
func WithCPUPressure(b bool) StatusOption
func WithDiskPressure ¶
func WithDiskPressure(b bool) StatusOption
func WithMemoryPressure ¶
func WithMemoryPressure(b bool) StatusOption
func WithNetworkUnavailable ¶
func WithNetworkUnavailable(b bool) StatusOption
func WithReady ¶
func WithReady(b bool) StatusOption
Click to show internal directories.
Click to hide internal directories.