Bedrock.Cluster.Descriptor (bedrock v0.6.0)
View SourceA module for reading and writing cluster descriptors to and from files.
A cluster descriptor is a file that contains the name of the cluster, the id of the cluster, and the names of the coordinator nodes in the cluster.
Summary
Types
A Descriptor struct holds a cluster's name and the list of nodes that act
as it's coordinators.
Functions
Reads the cluster descriptor from a file.
Reads the cluster descriptor from a file. Raises an exception if an error was encountered.
Writes the cluster descriptor to a file.
Types
Functions
@spec read_from_file(path_to_file :: Path.t()) :: {:ok, t()} | {:error, :unable_to_read_file | :invalid_cluster_descriptor}
Reads the cluster descriptor from a file.
Reads the cluster descriptor from a file. Raises an exception if an error was encountered.
@spec write_to_file!(path_to_file :: Path.t(), %Bedrock.Cluster.Descriptor{ cluster_name: term(), coordinator_nodes: term() }) :: :ok
Writes the cluster descriptor to a file.