Documentation ¶
Index ¶
- func ALLRegisterNodes() (list []*node.Node, err error)
- func AllNodes() (list []*node.Node, err error)
- func AllNodesMap() (mapping map[string]*node.Node, err error)
- func AllRegisterNodesMap() (mapping map[string]*node.Node, err error)
- func AllWorkNodesMap() (res map[string]*node.Node, err error)
- func AllocatablePrefix() string
- func CapacityMap() (mapping map[string]*node.Capacity, err error)
- func CapacityPrefix() string
- func CreateNode(n *node.Node) (err error)
- func CreateNodeIfNotExist(n *node.Node) (err error)
- func CreateOrUpdateStatus(nodeName string, opts ...node.StatusOption) (ok bool, err error)
- func CreateStatusIfNotExist(n *node.Status) (err error)
- func DeleteStatus(name string) (err error)
- func GetNode(name string) (n *node.Node, err error)
- func GetStatus(nodeName string) (s *node.Status, err error)
- func NodePrefix() string
- func NodeRegisterPrefix() string
- func StatusMap() (mapping map[string]*node.Status, err error)
- func StatusPrefix() string
- func UpdateAllocatable(al *node.Allocatable) (err error)
- func UpdateCapacity(cap *node.Capacity) (err error)
- func UpdateNode(nodeName string, opts ...node.NodeOption) (ok bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ALLRegisterNodes ¶
ALLRegisterNodes returns all register nodes
func AllNodesMap ¶
AllNodesMap returns all register nodes in map form
func AllRegisterNodesMap ¶
AllRegisterNodesMap returns all register nodes from etcd in map form
func AllWorkNodesMap ¶
AllWorkNodesMap returns all register nodes from etcd in map form
func AllocatablePrefix ¶
func AllocatablePrefix() string
AllocatablePrefix returns prefix key of etcd for allocatable
func CapacityMap ¶
CapacityMap returns capacity data in map form
func CapacityPrefix ¶
func CapacityPrefix() string
CapacityPrefix returns prefix key of etcd for capacity
func CreateNodeIfNotExist ¶
CreateNodeIfNotExist create a node in etcd if that not exist
func CreateOrUpdateStatus ¶
func CreateOrUpdateStatus(nodeName string, opts ...node.StatusOption) (ok bool, err error)
CreateOrUpdateStatus crate of update status in etcd create if not exist
func CreateStatusIfNotExist ¶
CreateStatusIfNotExist create status if not exist
func DeleteStatus ¶
DeleteStatus delete node status in etcd
func NodeRegisterPrefix ¶
func NodeRegisterPrefix() string
NodeRegisterPrefix returns etcd prefix of register node
func UpdateAllocatable ¶
func UpdateAllocatable(al *node.Allocatable) (err error)
UpdateAllocatable update allocatable data to etcd
func UpdateCapacity ¶
UpdateCapacity update capacity data to etcd
func UpdateNode ¶
func UpdateNode(nodeName string, opts ...node.NodeOption) (ok bool, err error)
UpdateNode update a node data in etcd
Types ¶
This section is empty.