Skip to main content

ServicesCommand

Enum ServicesCommand 

Source
pub enum ServicesCommand {
    Up {
        names: Vec<String>,
        detach: bool,
    },
    Down {
        names: Vec<String>,
        purge: bool,
    },
    Add {
        names: Vec<String>,
    },
    Remove {
        names: Vec<String>,
        purge: bool,
    },
    List {
        all: bool,
    },
    Catalog,
    Restart {
        names: Vec<String>,
    },
    Status {
        name: Option<String>,
    },
    Logs {
        name: Option<String>,
        follow: bool,
        lines: usize,
    },
    Daemon(ServicesDaemonCommand),
}

Variants§

§

Up

Start the project’s declared services (or every service in names) and provision the project’s tenant in each. For the whole-project bring-up use bougie start.

Fields

§names: Vec<String>

Service names to bring up. Empty = every declared service.

§detach: bool

Start the services and return immediately instead of attaching to their combined log stream. Attaching is the default for an interactive (TTY) text-mode invocation; non-interactive runs and --format json-v1 always detach.

§

Down

Stop the project’s declared services (or every service in names). The shared global process stays up while any other project’s tenant remains. For the whole-project teardown use bougie stop.

Fields

§names: Vec<String>
§purge: bool

Destroy persisted tenant data (e.g. FLUSHDB on redis). Off by default — re-adding the service should restore state.

§

Add

Declare a service in the project. Errors if the name isn’t in the catalog. Use bougie services catalog to discover names.

Fields

§names: Vec<String>

One or more service names, each optionally @<version>.

§

Remove

Remove a service declaration from the project. Tenant data is kept by default (re-adding restores it); pass --purge to also destroy it.

Fields

§names: Vec<String>

Service names to remove.

§purge: bool

Also destroy the project’s tenant data for each service (same as bougie services down --purge) before undeclaring.

§

List

List the services declared in the current project.

Fields

§all: bool

Reserved for cross-project listing in Phase 3+. Today this degrades silently to per-project output.

§

Catalog

Print the built-in service catalog (no daemon required).

§

Restart

Restart the named services (or every declared service). Stops then starts the underlying global process; the tenant ledger is preserved, so generated passwords / DB numbers survive. Affects every project sharing the same service.

Fields

§names: Vec<String>
§

Status

Per-service status for the current project.

Fields

§name: Option<String>

Limit to a single service.

§

Logs

Tail (and optionally follow) service logs. With no name, shows the combined (“multilog”) stream of every service declared in the project, each line prefixed with its (colorized) service name — the same view bougie services up attaches to.

Fields

§name: Option<String>

Service name. Omit to tail every declared service at once.

§follow: bool

Follow the log; runs until interrupted (Ctrl-C).

§lines: usize

Number of trailing lines to print before any follow.

§

Daemon(ServicesDaemonCommand)

Inspect and control the bougied daemon.

Trait Implementations§

Source§

impl Debug for ServicesCommand

Source§

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

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

impl FromArgMatches for ServicesCommand

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 ServicesCommand

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
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.

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, 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.