pub struct Client { /* private fields */ }Expand description
Client for DeepStore Agent
Version: 1.0
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str) -> Self
pub fn new(baseurl: &str) -> Self
Create a new client.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(baseurl: &str, client: Client) -> Self
pub fn new_with_client(baseurl: &str, client: Client) -> Self
Construct a new client with an existing reqwest::Client,
allowing more control over its configuration.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Source§impl Client
impl Client
Sourcepub async fn post_drafts_documents<'a>(
&'a self,
x_allowed_scopes: Option<&'a str>,
body: &'a GetDraftDocumentsRequest,
) -> Result<ResponseValue<GetDraftDocumentsResponse>, Error<ErrorResponse>>
pub async fn post_drafts_documents<'a>( &'a self, x_allowed_scopes: Option<&'a str>, body: &'a GetDraftDocumentsRequest, ) -> Result<ResponseValue<GetDraftDocumentsResponse>, Error<ErrorResponse>>
Fetch documents from draft files (for streaming)
Sends a POST request to /drafts/documents
Sourcepub async fn post_field_capabilities<'a>(
&'a self,
body: &'a FieldCapabilityRequest,
) -> Result<ResponseValue<FieldCapabilityResults>, Error<ErrorResponse>>
pub async fn post_field_capabilities<'a>( &'a self, body: &'a FieldCapabilityRequest, ) -> Result<ResponseValue<FieldCapabilityResults>, Error<ErrorResponse>>
Field capabilities endpoint
Sends a POST request to /field-capabilities
Sourcepub async fn health_check<'a>(
&'a self,
) -> Result<ResponseValue<HealthStatus>, Error<()>>
pub async fn health_check<'a>( &'a self, ) -> Result<ResponseValue<HealthStatus>, Error<()>>
Health check endpoint that returns the service status
Sends a GET request to /health
Sourcepub async fn post_index<'a>(
&'a self,
body: &'a IndexRequest,
) -> Result<ResponseValue<IndexResponse>, Error<ErrorResponse>>
pub async fn post_index<'a>( &'a self, body: &'a IndexRequest, ) -> Result<ResponseValue<IndexResponse>, Error<ErrorResponse>>
Index a batch of drafts
Sends a POST request to /index
Sourcepub async fn post_logs<'a, B: Into<Body>>(
&'a self,
x_scope: Option<&'a str>,
body: B,
) -> Result<ResponseValue<IngestLogsSuccess>, Error<ErrorResponse>>
pub async fn post_logs<'a, B: Into<Body>>( &'a self, x_scope: Option<&'a str>, body: B, ) -> Result<ResponseValue<IngestLogsSuccess>, Error<ErrorResponse>>
Ingest OpenTelemetry (OTLP) format logs
Sends a POST request to /logs
Sourcepub async fn post_search<'a>(
&'a self,
x_allowed_scopes: Option<&'a str>,
body: &'a SearchRequest,
) -> Result<ResponseValue<SearchResults>, Error<ErrorResponse>>
pub async fn post_search<'a>( &'a self, x_allowed_scopes: Option<&'a str>, body: &'a SearchRequest, ) -> Result<ResponseValue<SearchResults>, Error<ErrorResponse>>
Search endpoint for querying log data
Sends a POST request to /search