#[non_exhaustive]pub enum ControlMethod {
Show 29 variants
Status,
ConfigGet,
ConfigSetUpstream,
LogSetLevel,
CacheGet,
CacheSetCap,
CacheClear,
HostedStoresList,
HostedStoresPin,
HostedStoresUnpin,
HostedStoresStatus,
SyncStatus,
SyncTrigger,
UpdaterStatus,
UpdaterSetChannel,
UpdaterPause,
UpdaterResume,
UpdaterCheckNow,
PairingList,
PairingApprove,
PairingRevoke,
PeerStatus,
PeersConnect,
PeersDisconnect,
Subscribe,
Unsubscribe,
ListSubscriptions,
PairingRequest,
PairingPoll,
}Expand description
A dig-node CONTROL method.
#[non_exhaustive] so adding a method in a minor release is additive; downstream matches must
carry a _ => … arm. Convert to/from the wire name with ControlMethod::name /
ControlMethod::from_name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Status
control.status — a rich node status snapshot.
ConfigGet
control.config.get — the node’s effective configuration.
ConfigSetUpstream
control.config.setUpstream — persist an upstream-RPC override (effective on restart).
LogSetLevel
control.log.setLevel — live-swap the running node’s tracing level filter.
CacheGet
control.cache.get — the on-disk cache view (cap/used/dir/shared).
CacheSetCap
control.cache.setCap — set the cache size cap (floored at 64 MiB).
CacheClear
control.cache.clear — delete all locally cached content.
HostedStoresList
control.hostedStores.list — every held/pinned store with its cached capsules.
HostedStoresPin
control.hostedStores.pin — pin a store (and pre-fetch when a root is given).
HostedStoresUnpin
control.hostedStores.unpin — unpin a store and evict its cached capsules.
HostedStoresStatus
control.hostedStores.status — per-store pinned flag + cached capsules.
SyncStatus
control.sync.status — whether authenticated whole-store sync is available + pin coverage.
SyncTrigger
control.sync.trigger — trigger a §21 sync for one capsule (storeId + root).
UpdaterStatus
control.updater.status — the DIG auto-update beacon’s current status.
UpdaterSetChannel
control.updater.setChannel — set the beacon’s update channel.
UpdaterPause
control.updater.pause — suspend auto-updates (optionally until a unix time).
UpdaterResume
control.updater.resume — resume auto-updates.
UpdaterCheckNow
control.updater.checkNow — force an immediate update check.
PairingList
control.pairing.list — list pending pairing requests + issued paired tokens.
PairingApprove
control.pairing.approve — approve a pending pairing, minting a scoped token.
PairingRevoke
control.pairing.revoke — revoke an issued paired token.
PeerStatus
control.peerStatus — live peer-pool + relay-reservation snapshot.
PeersConnect
control.peers.connect — dial a peer by address / resolve a connected peer_id.
PeersDisconnect
control.peers.disconnect — drop a pooled peer by peer_id.
Subscribe
control.subscribe — subscribe the node to a store (watch + gap-fill).
Unsubscribe
control.unsubscribe — stop watching a store.
ListSubscriptions
control.listSubscriptions — the node’s persisted subscription set.
PairingRequest
pairing.request — request a control-token pairing (returns a code to compare).
PairingPoll
pairing.poll — poll a pairing; once the operator approves, returns the scoped token once.
Implementations§
Source§impl ControlMethod
impl ControlMethod
Sourcepub const ALL: &'static [ControlMethod]
pub const ALL: &'static [ControlMethod]
Every catalogued method, in a stable order — the enumeration a machine reads to discover the full control surface, and the anchor the conformance KATs pin against.
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The stable JSON-RPC wire name. Never derived from anything else — the published contract.
Sourcepub fn from_name(name: &str) -> Option<ControlMethod>
pub fn from_name(name: &str) -> Option<ControlMethod>
Resolve a wire name back to its ControlMethod, or None for an unknown name.
Sourcepub const fn requires_auth(self) -> bool
pub const fn requires_auth(self) -> bool
Does calling this method require the local control token?
Every control.* method is token-gated; the two OPEN pairing-bootstrap methods
(pairing.request / pairing.poll) are not, so a token-less client can obtain a token.
Sourcepub const fn is_pairing_admin(self) -> bool
pub const fn is_pairing_admin(self) -> bool
Is this a PAIRING-ADMINISTRATION method that requires the MASTER control token specifically?
A paired (scoped) token can drive ordinary control.* mutations but MUST NOT mint more
tokens or revoke itself — so listing/approving/revoking pairings requires the master token
(a local file read), never a paired token.
Trait Implementations§
Source§impl Clone for ControlMethod
impl Clone for ControlMethod
Source§fn clone(&self) -> ControlMethod
fn clone(&self) -> ControlMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more