-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Description
Hi! So I wanted to understand better how the comms between configuration server and e.g. CLI is supposed to work.
There is no documentation about this. I suppose right now it should work something like:
# 1. Open connection to the UNIX socket
connection = open_unix_socket("unix:///path/to/sozu.sock")
try:
# 2. Serialize protobuf message
# - Object to Byte Array via protobuf libs?
protobuf_message = create_protobuf_message()
serialized_message = serialize_protobuf(protobuf_message)
# 3. Write serialized message to the connection
connection.write(serialized_message)
# 4. Read response from the connection
# - How is it delimited? Just EOF?
response_data = connection.read()
# 5. Deserialize the protobuf message
# - Byte Array to Object via protobuf libs?
deserialized_response = deserialize_protobuf(response_data)
# Use the deserialized response as needed
process_response(deserialized_response)
finally:
# 6. Close the connection
connection.close()Metadata
Metadata
Assignees
Labels
No labels