Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveNodeIDsToFile ¶
SaveNodeIDsToFile creates a new Nodes struct from node IDs and saves it to the specified path.
Types ¶
type Nodes ¶
type Nodes struct {
Nodes map[string]struct{} `json:"nodes"`
}
Nodes represents a set of node IDs. This is used to keep track of which nodes are available for a given domain. This struct is serialized to JSON and stored in each domain directory in the `nodes.json` file
func LoadNodesFromFile ¶
LoadNodesFromFile loads nodes from a JSON file at the specified path.
func (*Nodes) SaveToFile ¶
SaveToFile saves the nodes to a JSON file at the specified path. If the file already exists, the new nodes will be merged with the existing nodes. If a node with the same id already exists, it will be overwritten.
Click to show internal directories.
Click to hide internal directories.