Skip to main content

ControlMethod

Enum ControlMethod 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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

Source

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.

Source

pub const fn name(self) -> &'static str

The stable JSON-RPC wire name. Never derived from anything else — the published contract.

Source

pub fn from_name(name: &str) -> Option<ControlMethod>

Resolve a wire name back to its ControlMethod, or None for an unknown name.

Source

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.

Source

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.

Source

pub const fn routing(self) -> Routing

How the node routes this method (shell-owned, engine-delegated, or open bootstrap).

Source

pub const fn category(self) -> Category

The functional area this method belongs to.

Source

pub const fn summary(self) -> &'static str

A one-line human/agent description for the discovery catalogue.

Trait Implementations§

Source§

impl Clone for ControlMethod

Source§

fn clone(&self) -> ControlMethod

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ControlMethod

Source§

impl Debug for ControlMethod

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ControlMethod

Source§

impl Hash for ControlMethod

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ControlMethod

Source§

fn eq(&self, other: &ControlMethod) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ControlMethod

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.