FerricStore.Protocol (ferricstore_sdk v0.1.0)

Copy Markdown View Source

Encoder and decoder for the FerricStore native TCP protocol.

This module is intentionally small and allocation-conscious because every SDK command passes through it. Higher-level modules should build simple command argument lists and let this module handle the wire format.

Summary

Types

frame()

@type frame() :: %{
  flags: non_neg_integer(),
  lane_id: non_neg_integer(),
  opcode: non_neg_integer(),
  request_id: non_neg_integer(),
  body_length: non_neg_integer()
}

Functions

command_payload(command, args \\ [])

compact_flow_complete_many_payload(payload)

compact_flow_create_many_ids_payload(type, state, partition_key, ids, opts \\ [])

compact_flow_create_many_payload(payload)

custom_payload(payload)

decode_response_body(flags, opcode, body)

decode_response_header(arg1)

decode_value(arg1)

encode_request(opcode, request_id, payload, opts \\ [])

encode_value(value)

flag_compressed()

flag_custom_payload()

flag_more_chunks()

header_size()

magic()

opcode(atom)

pipeline_payload(commands, opts \\ [])

request_version()

response_version()

status_ok()