Package com.github.loki4j.client.http
Class ApacheHttpClient
- java.lang.Object
-
- com.github.loki4j.client.http.ApacheHttpClient
-
- All Implemented Interfaces:
Loki4jHttpClient,java.lang.AutoCloseable
public final class ApacheHttpClient extends java.lang.Object implements Loki4jHttpClient
Loki sender that is backed by ApacheHttpClient
-
-
Constructor Summary
Constructors Constructor Description ApacheHttpClient(HttpConfig conf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()HttpConfiggetConfig()Get HTTP configuration for this clientLokiResponsesend(java.nio.ByteBuffer batch)Send a batch to Loki
-
-
-
Constructor Detail
-
ApacheHttpClient
public ApacheHttpClient(HttpConfig conf)
-
-
Method Detail
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
send
public LokiResponse send(java.nio.ByteBuffer batch) throws java.lang.Exception
Description copied from interface:Loki4jHttpClientSend a batch to Loki- Specified by:
sendin interfaceLoki4jHttpClient- Returns:
- A response from Loki
- Throws:
java.lang.Exception- If send was not successful
-
getConfig
public HttpConfig getConfig()
Description copied from interface:Loki4jHttpClientGet HTTP configuration for this client- Specified by:
getConfigin interfaceLoki4jHttpClient
-
-