Documentation
¶
Index ¶
- type Node
- type NodeContext
- type Registry
- func (r *Registry) AllNodes() []*Node
- func (r *Registry) AllTopologyNames() []string
- func (r *Registry) GetNode(name string) (*Node, bool)
- func (r *Registry) GetNodeContext(name string) (*NodeContext, bool)
- func (r *Registry) GetTopology(name string) (*Topology, bool)
- func (r *Registry) NodesByRole(role string) []*Node
- func (r *Registry) NodesForTopologyRole(topologyName, role string) []*Node
- func (r *Registry) RemoveNode(name string) error
- func (r *Registry) RenameNode(oldName, newName string) error
- func (r *Registry) Save() error
- func (r *Registry) SetNode(n *Node) error
- func (r *Registry) SetNodeContext(name string, ctx *NodeContext) error
- func (r *Registry) SetTopology(t *Topology) error
- type Topology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
Name string `json:"name"`
Address string `json:"address"`
Role string `json:"role,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
OS string `json:"os,omitempty"`
Arch string `json:"arch,omitempty"`
CPUCount int `json:"cpu_count,omitempty"`
Memory int64 `json:"memory_bytes,omitempty"`
LastSeen time.Time `json:"last_seen,omitempty"`
TransportMode string `json:"transport_mode,omitempty"`
TLSServerName string `json:"tls_server_name,omitempty"`
}
Node represents a registered test machine.
type NodeContext ¶
type NodeContext struct {
WorkingDir string `json:"working_dir,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
NodeContext stores persistent per-node defaults.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages nodes, topologies, and contexts with JSON persistence.
func (*Registry) AllTopologyNames ¶
AllTopologyNames returns the names of all topologies.
func (*Registry) GetNodeContext ¶
func (r *Registry) GetNodeContext(name string) (*NodeContext, bool)
GetNodeContext returns the persistent context for a node.
func (*Registry) GetTopology ¶
GetTopology returns a topology by name.
func (*Registry) NodesByRole ¶
NodesByRole returns all nodes with the given role. Comparison is case-insensitive.
func (*Registry) NodesForTopologyRole ¶
NodesForTopologyRole returns nodes for a specific role in a topology. Role comparison is case-insensitive.
func (*Registry) RemoveNode ¶
RemoveNode deletes a node by name.
func (*Registry) RenameNode ¶
RenameNode renames a node, updating all references in contexts and topologies.
func (*Registry) SetNodeContext ¶
func (r *Registry) SetNodeContext(name string, ctx *NodeContext) error
SetNodeContext sets persistent defaults for a node.
func (*Registry) SetTopology ¶
SetTopology adds or updates a topology.