pub struct Plan {
pub state: PathBuf,
pub repos: PathBuf,
pub auth: PathBuf,
pub key: PathBuf,
pub trusted: PathBuf,
pub config: PathBuf,
pub port: u16,
}Expand description
Where everything choir init writes is going.
Built before anything is created so the refusal can name every conflict at once. A tool that fails on the first collision, is fixed, and then fails on the second is a tool that gets run four times.
Fields§
§state: PathBuf~/.choir, or the directory given.
repos: PathBufWhere bare repositories live; the node’s positional root.
auth: PathBufuser:token, mode 0600.
key: PathBufThis actor’s 32 secret bytes, mode 0600.
trusted: PathBufThe public keys the node will accept ops from.
config: PathBuf.choir/config in the working directory, not in state: it is
found the way git finds a repository, by walking up from wherever
you are, so a checkout can name a different node than the one
your home directory happens to point at.
port: u16The port the node will bind.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn node_url(&self) -> String
pub fn node_url(&self) -> String
The URL the other commands will use.
Loopback, and not configurable here on purpose: Node refuses
a non-loopback bind without TLS, which is the privacy rule
expressed as code rather than a doc note. Offering --bind on
the command that runs first would put a certificate between a
reader and their first push.