pub enum SourceType {
Http {
url: String,
method: Option<String>,
headers: HashMap<String, String>,
format: DataFormat,
extract: Option<ExtractExpr>,
},
Command {
command: Vec<String>,
format: DataFormat,
extract: Option<ExtractExpr>,
},
File {
path: PathBuf,
format: DataFormat,
extract: Option<ExtractExpr>,
},
Nats {
url: String,
subject: String,
format: DataFormat,
extract: Option<ExtractExpr>,
},
}Expand description
Type-specific configuration for a dynamic source.
Variants§
Http
Fetch data from an HTTP endpoint.
Command
Run a local command and capture its stdout.
File
Read data from a local file.
Nats
Subscribe to a NATS subject for push-based updates.
Trait Implementations§
Source§impl Clone for SourceType
impl Clone for SourceType
Source§fn clone(&self) -> SourceType
fn clone(&self) -> SourceType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceType
impl Debug for SourceType
Source§impl PartialEq for SourceType
impl PartialEq for SourceType
Source§fn eq(&self, other: &SourceType) -> bool
fn eq(&self, other: &SourceType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SourceType
Auto Trait Implementations§
impl Freeze for SourceType
impl RefUnwindSafe for SourceType
impl Send for SourceType
impl Sync for SourceType
impl Unpin for SourceType
impl UnsafeUnpin for SourceType
impl UnwindSafe for SourceType
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
Mutably borrows from an owned value. Read more