pub enum Command {
Show 19 variants
Master {
migrate: bool,
},
Worker,
Webserver,
Ui,
Standalone {
listen: Option<IpAddr>,
migrate: bool,
no_ui: bool,
dag_path: Vec<PathBuf>,
script_path: Vec<PathBuf>,
},
Db {
command: DbCommand,
},
Secrets {
command: SecretsCommand,
},
Dags {
client: ClientArgs,
command: DagsCommand,
},
Runs {
client: ClientArgs,
command: RunsCommand,
},
Tasks {
client: ClientArgs,
command: TasksCommand,
},
Connections {
client: ClientArgs,
command: ConnectionsCommand,
},
Sensors {
client: ClientArgs,
command: SensorsCommand,
},
Triggers {
client: ClientArgs,
command: TriggersCommand,
},
Events {
client: ClientArgs,
command: EventsCommand,
},
Resources {
client: ClientArgs,
command: ResourcesCommand,
},
Workers {
client: ClientArgs,
command: WorkersCommand,
},
TaskCtx {
command: TaskCtxCommand,
},
DagCtx {
command: DagCtxCommand,
},
TaskExec {
data_limit: u64,
command: Vec<OsString>,
},
}Expand description
The top-level commands.
Variants§
Master
Run the master: scheduling loop, state in the database, internal API for workers.
Fields
Worker
Run a worker agent.
Webserver
Run the webserver: the REST API used by the web UI and the CLI.
Ui
Run the web UI over webservers’ APIs ([ui] deployments).
Standalone
Run every role in one process (SQLite or Postgres): local development, or one pod in production.
Fields
listen: Option<IpAddr>The address the REST API listens on (default 127.0.0.1); e.g. 0.0.0.0 in a pod behind a Service. The master’s gRPC stays on loopback.
migrate: boolMigrate the database at start (as schedr db migrate does) instead of refusing a
schema that isn’t up to date: for a laptop. In production, migrate as a step of its
own (the Helm chart’s init container).
no_ui: boolServe only the API on its port, not the web UI: one deployment of a schedr ui
elsewhere (a federation of standalones).
Db
Manage the database schema.
Secrets
Set, list, read and export the secrets of standalone’s db storage (straight in the
database, as db is; values encrypted under SCHEDR_SECRET_KEY).
Fields
command: SecretsCommandThe secrets command.
Dags
List, pause, check and test DAGs.
Runs
Trigger, list, show, cancel and backfill runs.
Tasks
Cancel or retry single tasks of a run, or read their attempts, logs and outputs.
Connections
Check a deployment’s connections, or test one, on a worker.
Fields
client: ClientArgsHow to reach the server.
command: ConnectionsCommandThe connections command.
Sensors
Wait steps switched off for getting their host killed.
Triggers
Event triggers: see them, and start them again.
Events
Events posted for EventNamed triggers and waiting steps (decision 354).
Resources
A run’s resources.
Workers
Drain and resume workers.
TaskCtx
Inside a running task: cleanup handles, resource values, declared secrets.
Fields
command: TaskCtxCommandThe task context command.
DagCtx
Inside a running task: the run’s parameters and run information.
Fields
command: DagCtxCommandThe DAG context command.
TaskExec
Internal, started by a worker: caps the process’s data (RLIMIT_DATA) and runs the
task’s program in its place (hard_memory_limit=True, decisions 50, 438).
Implementations§
Source§impl Command
impl Command
Sourcepub fn overrides(&self, cwd: &Path) -> Result<Vec<Override>, String>
pub fn overrides(&self, cwd: &Path) -> Result<Vec<Override>, String>
The configuration its options give, over the file and the environment: standalone’s
--dag-path and --script-path (decision 488), each path as root_path makes it.
§Errors
A path that isn’t UTF-8, naming the flag: the configuration’s paths are text, and a lossy copy could name another folder (Codex’s review of M5.1n).
Sourcepub const fn client_args_mut(&mut self) -> Option<&mut ClientArgs>
pub const fn client_args_mut(&mut self) -> Option<&mut ClientArgs>
Its webserver client’s arguments, for a command reaching one.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);