pub struct ScriptConnector {
name: String,
config: ScriptConnectorConfig,
}Expand description
A Lua scripted connector instance that implements the Connector trait.
Wraps the scan_script function, allowing Lua connectors to be used
through the unified trait-based dispatch alongside built-in connectors.
Fields§
§name: StringInstance name (e.g. "jira").
config: ScriptConnectorConfigConfiguration for this script connector instance.
Implementations§
Source§impl ScriptConnector
impl ScriptConnector
Sourcepub fn new(name: String, config: ScriptConnectorConfig) -> Self
pub fn new(name: String, config: ScriptConnectorConfig) -> Self
Create a new script connector instance.
Trait Implementations§
Source§impl Connector for ScriptConnector
impl Connector for ScriptConnector
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns a one-line description of what this connector does. Read more
Source§fn connector_type(&self) -> &str
fn connector_type(&self) -> &str
Source§fn scan<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SourceItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn scan<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SourceItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Scan the data source and return all items to ingest. Read more
Source§fn source_label(&self) -> String
fn source_label(&self) -> String
Returns the source label used to tag documents from this connector. Read more
Auto Trait Implementations§
impl Freeze for ScriptConnector
impl RefUnwindSafe for ScriptConnector
impl Send for ScriptConnector
impl Sync for ScriptConnector
impl Unpin for ScriptConnector
impl UnwindSafe for ScriptConnector
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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