Copyright © ?? Daniel Kempkens
Version: Apr 13 2020 14:27:19
Authors: Daniel Kempkens (daniel@kempkens.io).
abstract datatype: state()
transport() = detect | udp | tcp | config
| connect/0 | Tries to connect to Riemann via UDP and TCP. |
| connect/2 | Tries to connect to Riemann via UDP and TCP using the specified Host and Port. |
| connect/3 | Tries to connect to Riemann via UDP and TCP using the specified Host and Port and Transport. |
| connect_tcp/0 | Tries to connect to Riemann via TCP only. |
| connect_tcp/2 | Tries to connect to Riemann via TCP using the specified Host and Port. |
| connect_udp/0 | Tries to connect to Riemann via UDP only. |
| connect_udp/2 | Tries to connect to Riemann via UDP using the specified Host and Port. |
| disconnect/1 | Disconnects all connected sockets from Riemann. |
| send_message/3 | Sends a message to Riemann via UDP or TCP. |
connect() -> {ok, state()} | {error, term()}
Tries to connect to Riemann via UDP and TCP. Delegates to connect/2.
Host and Port are read from the application configuration.
Defaults
Host: 127.0.0.1
Port: 5555
connect(Host::string(), Port::pos_integer()) -> {ok, state()} | {error, term()}
Tries to connect to Riemann via UDP and TCP using the specified Host and Port.
A default message transport can be set using the application configuration.
Delegates to connect/3.
Defaults
Transport: detect
connect(Host::string(), Port::pos_integer(), Transport::transport()) -> {ok, state()} | {error, term()}
Tries to connect to Riemann via UDP and TCP using the specified Host and Port and Transport.
The Transport option only affects entities (events and/or states) that are sent to Riemann,
since querying always uses TCP.
connect_tcp() -> {ok, state()} | {error, term()}
Tries to connect to Riemann via TCP only. Delegates to connect_tcp/2.
Host and Port are read from the application configuration.
Defaults
Host: 127.0.0.1
Port: 5555
connect_tcp(Host::string(), Port::pos_integer()) -> {ok, state()} | {error, term()}
Tries to connect to Riemann via TCP using the specified Host and Port.
connect_udp() -> {ok, state()} | {error, term()}
Tries to connect to Riemann via UDP only. Delegates to connect_udp/2.
Host and Port are read from the application configuration.
Defaults
Host: 127.0.0.1
Port: 5555
connect_udp(Host::string(), Port::pos_integer()) -> {ok, state()} | {error, term()}
Tries to connect to Riemann via UDP using the specified Host and Port.
disconnect(Connection_state::state()) -> ok
Disconnects all connected sockets from Riemann.
This method detects which sockets actually exist and only disconnects the ones that do.
send_message(Transport::transport(), Msg::binary(), Connection_state::state()) -> {{ok, riemannpb_message()}, state()} | {{error, term()}, state()}
Sends a message to Riemann via UDP or TCP.
Transport can be one of the following values:
config: Uses the transport configuration option
detect: Uses the UDP transport for messages up to 16Kb in size and TCP for everything larger than that
udp: Send the message via UDP
tcp: Sends the message via TCP
Generated by EDoc