Expand description
libbarto - This is the main library for barto, a job scheduling system.
§Features
- A redb Key and Value implementation for bincode encoded/decoded data.
- Shared message data structures
- Client specific message data structures
- Server specific message data structures
- The
Realtimestruct for handling real-time scheduling. - TLS configuration loading.
- Tracing initialization and configuration.
- Common header output for startup.
- Utility functions for parsing and sending pings/pongs.
Structs§
- Actix
- Configuration for the Actix web server
- Bartoc
Info - bartoc client system information
- Bartos
- Used in bartoc configuration to define the bartos instance to connect to
- Bincode
- A generic newtype to handle redb keys and values that implement
bincode::Encodeandbincode::Decode - Client
Data - bartoc client data
- Command
- A command to run on a worker
- DayOf
Month - Represents a day of the month (1-31)
- Dow
- The day(s) of the week matcher
- Failed
Output - The output of a
Failedrequest - File
Layer - Tracing configuration
- Garuda
- A garuda-update message
- Hour
OfDay - Represents an hour of the day (0-23)
- Initialize
- An initialization message from bartos to a named bartoc client.
- Layer
- Tracing configuration
- List
Output - The output of a
Listrequest, containing the names of all registered bartoc clients - Mariadb
- The
MariaDBconfiguration - Minute
OfHour - Represents a minute of the hour (0-59)
- Month
OfYear - A month of the year (1-12)
- Offset
Data Time Wrapper - An
OffsetDateTimewrapper that implementsbincode::Encodeandbincode::Decode - Output
- An output record from a bartoc client
- Pacman
- A garuda-update message
- Realtime
- A realtime schedule definition
- Schedule
- A schedule
- Schedules
- The schedule to run commands on a given worker client
- Second
OfMinute - Represents a second of the minute (0-59)
- Status
- An output record from a bartoc client
- Tls
- TLS configuration for the Actix web server
- Tracing
- Tracing configuration
- Uuid
Wrapper - A
Uuidwrapper that implementsbincode::Encodeandbincode::Decode
Enums§
- Barto
Cli - Messages from barto-cli to bartos
- Bartoc
- A websocket binary message from bartoc to bartos
- Bartoc
Ws - A supported websocket message from bartoc to bartos
- Bartos
ToBarto Cli - A message from bartos to barto-cli
- Bartos
ToBartoc - A message from bartos to bartoc
- CliUpdate
Kind - The update kind we are requesting
- Constrained
Value - A value constrained by specific rules (such as the day of the month)
- Data
- A record of data from a bartoc client
- Error
- Error types for the barto library
- Missed
Tick - The output table name
- Output
Kind - The kind of output (stdout or stderr)
- Update
Kind - The update kind
Traits§
- Constrainable
- A trait for types that can be constrained
- Constrained
Value Matcher - A trait for matching constrained values
- Constrained
Value Parser - A trait for parsing constrained values
- Path
Defaults - Trait to allow default paths to be supplied to
load - TlsConfig
- A trait for types that provide TLS configuration details.
- Tracing
Config Ext - Extension trait for
TracingConfigto add additional configuration options
Functions§
- clap_
or_ error - Converts an
anyhow::Errorinto a suitable exit code or clap message for a CLI application. - clean_
output_ string - Clean an output string by removing tabs, new lines, carriage returns, and ANSI escape codes.
- header
- Generate a pretty header
- init_
tracing - Initialize tracing
- load
- Load the configuration
- load_
tls_ config - Generates a
ServerConfigfor TLS using the provided configuration. - parse_
ts_ ping - Parse a received timestamp ping
- send_
ts_ ping - Send a timestamp ping
- success
- Indicates successful execution of a function, returning exit code 0.
- to_
path_ buf - Convert a string to a
PathBuf
Type Aliases§
- Day
- Represents a constrained value for the day of the month (1-31)
- Hour
- Represents a constrained value matcher for hours of the day
- Minute
- Represents a constrained value matcher for minutes of the hour
- Month
- A constrained value representing a month of the year (1-12)
- Second
- Represents a constrained value matcher for seconds of the minute
- Year
- A year constraint for realtime schedules (
i32::MIN..=i32::MAX)