pub fn new(
        template: RequestTemplate,
        retry: RetrySender,
        state_handles: Option<(FileOffsetWriteHandle, FileOffsetFlushHandle)>,
    ) -> Self {
        let (state_write, state_flush) = state_handles
            .map(|(sw, sf)| (Some(sw), Some(sf)))
            .unwrap_or((None, None));
        Self {
            inner: HttpClient::new(template),
            limiter: RateLimiter::new(10),
            retry,
            state_write,
            state_flush,
        }
    }
/// Used to create a new instance of client, requiring a channel sender for retry
/// and a request template for building ingest requests
Used to create a new instance of client, requiring a channel sender for retry
and a request template for building ingest requests
Used to create a new instance of client requiring a channel sender for retry and a request template for building ingest requests
pub fn new(
        template: RequestTemplate,
        retry: RetrySender,
        state_handles: Option<(FileOffsetWriteHandle, FileOffsetFlushHandle)>,
    ) -> Self {
        let (state_write, state_flush) = state_handles
            .map(|(sw, sf)| (Some(sw), Some(sf)))
            .unwrap_or((None, None));
        Self {
            inner: HttpClient::new(template),
            limiter: RateLimiter::new(10),
            retry,
            state_write,
            state_flush,
        }
    }
pub fn new ( template : RequestTemplate , retry : RetrySender , state_handles : Option < ( FileOffsetWriteHandle , FileOffsetFlushHandle ) > , ) -> Self { let ( state_write , state_flush ) = state_handles . map ( | ( sw , sf ) | ( Some ( sw ) , Some ( sf ) ) ) . unwrap_or ( ( None , None ) ) ; Self { inner : HttpClient :: new ( template ) , limiter : RateLimiter :: new ( 10 ) , retry , state_write , state_flush , } }
Used to create a new instance of client, requiring a channel sender for retry
and a request template for building ingest requests
Used to create a new instance of client requiring a channel sender for retry and a request template for building ingest requests
template
RequestTemplate
retry
RetrySender
state_handles
Option<(FileOffsetWriteHandle, FileOffsetFlushHandle)>
template
RequestTemplate
retry
RetrySender
state_handles
Option<(FileOffsetWriteHandle, FileOffsetFlushHandle)>