Behaviours: gen_server
.
state() = #{transport := module(), host := string() | binary() | tuple(), port := pos_integer(), socket => gen_udp:socket() | gen_tcp:socket() | undefined}
handle_call/3 | |
handle_cast/2 | |
init/1 | |
send/1 | Send an encoded JSON message to logstash. |
send_message/2 | Send a custom message with fields to logstash. |
start_link/0 | |
terminate/2 |
handle_call(X1::{send, binary()}, X2::term(), State::state()) -> {reply, ok | {error, atom() | {timeout, binary()}}, state()}
init(X1::term()) -> {ok, state()}
send(Data::binary()) -> ok | {error, atom()}
Send an encoded JSON message to logstash.
send_message(Message::binary(), Fields::map()) -> ok | {error, atom()}
Send a custom message with fields to logstash. The fields must be valid input for the json encoder.
start_link() -> {ok, pid()} | {error, term()}
terminate(X1::term(), X2::state()) -> ok
Generated by EDoc