Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NodeTypesToKind = map[NodeType]string{ NodeMaster: "master", NodeConnector: "connector", NodeGameServer: "gameserver", } NodeKindToTypes = map[string]NodeType{ "master": NodeMaster, "connector": NodeConnector, "gameserver": NodeGameServer, } NodeTypesToStatus = map[NodeStatus]string{ NodeStoped: "stoped", NodeStoping: "stoping", NodeStarting: "starting", NodeStarted: "started", } NodeStatusToTypes = map[string]NodeStatus{ "stoped": NodeStoped, "stoping": NodeStoping, "starting": NodeStarting, "started": NodeStarted, } )
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Nid string `json:"nid"` Name string `json:"name"` Gsid string `json:"gsid"` Address string `json:"address"` Type NodeType `json:"type"` Status NodeStatus `json:"status"` }
func (*Node) SetNodeStatus ¶
func (n *Node) SetNodeStatus(nstatus NodeStatus, opt NodeOpts)
type NodeOpts ¶
type NodeOpts func(n *Node)
func WithNodeAddress ¶
func WithNodeGsid ¶
func WithNodeID ¶
func WithNodeStatus ¶
func WithNodeStatus(status NodeStatus) NodeOpts
type NodeStatus ¶
type NodeStatus int
const ( NodeStoped NodeStatus NodeStoping NodeStarting NodeStarted )
Click to show internal directories.
Click to hide internal directories.