Module nifi_s2s

Main public interface to receive and transfer Flowfiles.

Description

Main public interface to receive and transfer Flowfiles.

Data Types

client_option()

client_option() = {timeout, non_neg_integer()} | {batch_count, non_neg_integer()} | {batch_size, non_neg_integer()} | {batch_duration, non_neg_integer()}

{timeout, Timeout}
Timeout waiting for reply.
{batch_count, Value}
Number of flowfiles that server will send.
{batch_size, Value}
Maximum number of bytes that the server will send.
{batch_duration, Value}
Maximum transfer duration.

client_options()

client_options() = [client_option()]

s2s_config()

s2s_config() = #{scheme => scheme(), hostname => string(), port => non_neg_integer(), transport_protocol => transport_protocol(), local_network_interface => string(), port_id => binary() | string()}

{scheme, Scheme}
http or https.
{hostname, Hostname}
The NiFi host to make the initial connection.
{port, Port}
The http or https tcp port number.
{transport_protocol, Protocol}
The type of the client protocol.
{local_network_interface, Ifc}
The network interface to use.
{port_id, PortId}
The NiFi Output or Input port id.

scheme()

scheme() = string()

The scheme, one of http or https.

transport_protocol()

transport_protocol() = raw | http

The type of client protocol.

Function Index

close/1Closes a connection.
create_client/1Creates site-to-site client.
create_client/2Creates site-to-site client.
receive_flowfiles/1Receives flow file from server.
transfer_flowfiles/2Transfers flow file to server.
transmit_payload/3Transfers raw data and attributes to server.

Function Details

close/1

close(Pid::pid()) -> ok

Closes a connection. Finishes all pending transaction and sends a shutdown to the peer.

create_client/1

create_client(S2SConfig::s2s_config()) -> {ok, pid()}

Creates site-to-site client.

See also: create_client/2.

create_client/2

create_client(S2SConfig::s2s_config(), Options::client_options()) -> {ok, pid()}

Creates site-to-site client. This function will do all the steps as described in site-to-site-protocol-sequence.

receive_flowfiles/1

receive_flowfiles(Pid::pid()) -> {ok, nifi_flowfile:flowfiles()}

Receives flow file from server.

transfer_flowfiles/2

transfer_flowfiles(Pid::pid(), Flowfile::nifi_flowfile:flowfiles()) -> ok

Transfers flow file to server.

transmit_payload/3

transmit_payload(Pid::pid(), Payload::binary(), Attributes::map()) -> boolean()

Transfers raw data and attributes to server.


Generated by EDoc