[−][src]Struct logdna_client::client::Client
Client for sending IngestRequests to LogDNA
Methods
impl Client
[src]
pub fn new(template: RequestTemplate, runtime: &mut Runtime) -> Self
[src]
Create a new client taking a RequestTemplate and Tokio Runtime
Example
let mut rt = Runtime::new().expect("Runtime::new()"); let params = Params::builder() .hostname("rust-client-test") .tags(Tags::parse("this,is,a,test")) .build() .expect("Params::builder()"); let request_template = RequestTemplate::builder() .params(params) .api_key("<your ingestion key>") .build() .expect("RequestTemplate::builder()"); let client = Client::new(request_template, &mut rt);
pub fn send(&self, body: IngestBody) -> IngestResponse
[src]
Send an IngestBody to the LogDNA Ingest API
Returns an IngestResponse, which is a future that must be run on the Tokio Runtime
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,