Skip to main content

ServiceAction

Enum ServiceAction 

Source
pub enum ServiceAction {
    Install {
        services: Option<Vec<String>>,
        start: bool,
        enable: bool,
        system: bool,
        systemd_session: bool,
        verbose: bool,
    },
    Uninstall {
        services: Option<Vec<String>>,
    },
    Start {
        name: Option<String>,
        foreground: bool,
        daemon: bool,
        standalone: bool,
        ipc: bool,
        services: Option<Vec<String>>,
        quic_bind: Option<String>,
        print_cert_hash: bool,
    },
    Stop {
        name: Option<String>,
    },
    Status {
        verbose: bool,
    },
    Repair {
        verbose: bool,
    },
    EnsureKey {
        name: String,
    },
    ReconcileEnrollment,
    EnsureNodeAuthority,
    ProvisionPolicyTemplates {
        template: Vec<String>,
    },
    ReadbackLocalCanary {
        path: PathBuf,
        expected_head: String,
    },
    RegisterLocalCanary {
        path: PathBuf,
        expected_head: String,
    },
}
Expand description

Service management actions

Variants§

§

Install

Install, repair, and update hyprstream services

Idempotent setup: bootstraps directories, registry, policy files, and signing key; installs command alias and systemd units. With –start: also stops and restarts services to pick up changes. With –enable: registers units for autostart at boot (systemctl enable). With –system: installs to /etc/systemd/system/ (requires root).

Fields

§services: Option<Vec<String>>

Operate on specific services only (comma-separated)

§start: bool

Stop and start services after installing/updating units

§enable: bool

Register services for autostart at boot (systemctl enable)

§system: bool

Install as system service in /etc/systemd/system/ (requires root)

§systemd_session: bool

Install as a session-scoped user service via the D-Bus session bus.

Use only for services tied to an active login session (e.g. TUI multiplexer). Not suitable for long-lived headless daemons.

§verbose: bool

Show verbose output for repair checks

§

Uninstall

Stop and remove systemd units

Fields

§services: Option<Vec<String>>

Operate on specific services only

§

Start

Start services (via systemd or direct spawn)

Without –foreground: Uses systemd if available, else spawns background process. With –foreground: Runs service in foreground (used by systemd ExecStart). With –daemon: Bypasses systemd and spawns process directly.

Fields

§name: Option<String>

Service name (all services if omitted)

§foreground: bool

Run in foreground instead of background

Used by systemd unit files (ExecStart) to run the service process. When running manually, keeps the service attached to the terminal.

§daemon: bool

Force daemon mode (bypass systemd, spawn process directly)

Use this to run services as standalone daemons even when systemd is available.

§standalone: bool

Run all services in a single foreground process

Starts every configured service in-process without systemd. Useful for containers, testing, and environments without a systemd user session.

§ipc: bool

Use IPC sockets for distributed mode

§services: Option<Vec<String>>

Comma-separated list of services to start in multi-service foreground mode

When used with –foreground, starts all listed services in a single process. Example: –services registry,policy,model,streams,event

§quic_bind: Option<String>

Bind address for QUIC/WebTransport server (e.g., 127.0.0.1:4433)

Enables WebTransport access to services via HTTP/3. Use port 0 for random port.

§print_cert_hash: bool

Print the SHA-256 hash of the QUIC TLS certificate and include it in startup output

The hash is suitable for use in browser’s serverCertificateHashes WebTransport option.

§

Stop

Stop services

Fields

§name: Option<String>

Service name (all services if omitted)

§

Status

Show service status

Displays running services, unit file locations, and execution mode.

Fields

§verbose: bool

Show verbose output including unit file contents

§

Repair

Diagnose the hyprstream installation

Runs all setup checks (directories, registry, policy, signing keys, TLS, bootstrap-pubkeys hybrid posture) and reports status without starting services. Dispatches before the hybrid gate so it works on a partially-broken install.

Fields

§verbose: bool

Show verbose output for each check

§

EnsureKey

Generate or load a service’s signing key and write its public sidecars

Runs the same key loader the service itself uses (with resolve_service_signing_key semantics, so policy resolves to the flat node/CA key), then ensures the public sidecars exist next to the seed: signing-key.pub (32-byte Ed25519 verifying key, 0644) and service-pubkey.hybrid (1984-byte hybrid bootstrap entry, 0644).

Idempotent: an existing key is loaded, never rotated, and up-to-date sidecars are left untouched. Does not start any services — intended for provisioning/keygen units that run before service startup.

Fields

§name: String

Service name (e.g. registry, discovery, policy)

§

ReconcileEnrollment

Validate retained bootstrap identities and reconcile their enrollment and JWTs

Runs offline before service startup. Never generates or rotates keys, changes the bootstrap key set, or replaces a disagreeing manifest.

§

EnsureNodeAuthority

Initialize or validate the node CA without provisioning a service roster

§

ProvisionPolicyTemplates

Persist built-in policy templates directly into the configured policy store

This offline provisioning command is intended for boot orchestration before Policy or Registry starts. It does not contact a service or load credentials.

Fields

§template: Vec<String>

Built-in template name; repeat for each template to provision

§

ReadbackLocalCanary

Read back one local canary through the enrolled Registry identity. Requires query authorization; never registers or retries. Uses a fresh outbound Iroh carrier identity; N0 can publish transient reach for it.

Fields

§path: PathBuf

Existing canonical direct child of the configured Registry base.

§expected_head: String

Full Git HEAD OID reviewed before readback.

§

RegisterLocalCanary

Register one existing local canary using the enrolled Registry identity. Uses a fresh outbound Iroh carrier; never retries an ambiguous write. N0 may publish transient reach for that carrier.

Fields

§path: PathBuf

Existing canonical direct child of the configured Registry base.

§expected_head: String

Full Git HEAD OID reviewed before registration.

Trait Implementations§

Source§

impl FromArgMatches for ServiceAction

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for ServiceAction

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

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

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> JaggedSlice<T> for T

§

type Index = Index2

§

fn push_into(self, array: &mut Jagged<T>)

§

fn insert_into(self, index: <T as JaggedSlice<T>>::Index, array: &mut Jagged<T>)

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ServiceExt for T

§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSync for T
where T: Sync,

§

impl<T> MaybeSync for T
where T: Sync,

§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,