Methods
BatchingTemporarySocket()
Class to mimic the Socket interface for a UDP client, but to provided
batching of outgoing sends using temporary Sockets that are created and
destroyed as needed.
- Source:
batchSendData(ops, callback)
Sends a collection of data over a UDP socket. This method
is designed to be used by `atomic-batcher` as a way to share
a single UDP socket for sending multiple data blocks.
Parameters:
Name | Type | Description |
---|---|---|
ops |
object | Details of the data to send |
callback |
function | The function to call when done |
- Source:
executeSendData(client, ops, index, callback)
Execute sending data starting at the specified index and
using the provided client.
Parameters:
Name | Type | Description |
---|---|---|
client |
Socket | Socket to send data with |
ops |
object | Details of data to send |
index |
number | Starting index for sending |
callback |
function | Function to call when done |
- Source:
getToken(callback)
Asynchronously retrieves a token used in requests to EC2 instance metadata service.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | callback to plugin |
- Source:
init()
Used to initialize segments on AWS Lambda with extra data from the context.
- Source:
sendMessage(client, data, batchCallback)
Send a single message over a UDP socket.
Parameters:
Name | Type | Description |
---|---|---|
client |
Socket | Socket to send data with |
data |
object | Details of the data to send |
batchCallback |
function | Function to call when done |
- Source: