pub(crate) struct Args {Show 17 fields
pub(crate) bootstrap_server: String,
pub(crate) schema_registry_url: Url,
pub(crate) topic: String,
pub(crate) num_records: usize,
pub(crate) partitions_round_robin: usize,
pub(crate) threads: usize,
pub(crate) key_format: KeyFormat,
pub(crate) key_min: Option<u64>,
pub(crate) key_max: Option<u64>,
pub(crate) avro_key_schema: Option<Schema>,
pub(crate) avro_key_distribution: Option<Value>,
pub(crate) value_format: ValueFormat,
pub(crate) min_value_size: Option<usize>,
pub(crate) max_value_size: Option<usize>,
pub(crate) avro_value_schema: Option<Schema>,
pub(crate) avro_value_distribution: Option<Value>,
pub(crate) quiet: bool,
}
Expand description
Write random data to Kafka.
Fields§
§bootstrap_server: String
Address of one or more Kafka nodes, comma separated, in the Kafka cluster to connect to.
schema_registry_url: Url
URL of the schema registry to connect to, if using Avro keys or values.
topic: String
Topic into which to write records.
num_records: usize
Number of records to write.
partitions_round_robin: usize
Number of partitions over which records should be distributed in a round-robin fashion, regardless of the value of the keys of these records.
The default value, 0, indicates that Kafka’s default strategy of distributing writes based upon the hash of their keys should be used instead.
threads: usize
The number of threads to use.
If zero, uses the number of physical CPUs on the machine.
key_format: KeyFormat
Format in which to generate keys.
key_min: Option<u64>
Minimum key value to generate, if using random-formatted keys.
key_max: Option<u64>
Maximum key value to generate, if using random-formatted keys.
avro_key_schema: Option<Schema>
Schema describing Avro key data to randomly generate, if using Avro-formatted keys.
avro_key_distribution: Option<Value>
JSON object describing the distribution parameters for each field of the Avro key object, if using Avro-formatted keys.
value_format: ValueFormat
Format in which to generate values.
min_value_size: Option<usize>
Minimum value size to generate, if using bytes-formatted values.
max_value_size: Option<usize>
Maximum value size to generate, if using bytes-formatted values.
avro_value_schema: Option<Schema>
Schema describing Avro value data to randomly generate, if using Avro-formatted values.
avro_value_distribution: Option<Value>
JSON object describing the distribution parameters for each field of the Avro value object, if using Avro-formatted keys.
quiet: bool
Suppress printing progress messages.
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Parser for Args
impl Parser for Args
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request