minos.common.protocol.abc

Classes

MinosBinaryProtocol

Minos binary encoder / decoder interface.

class MinosBinaryProtocol[source]

Bases: ABC

Minos binary encoder / decoder interface.

abstract classmethod encode(*args, **kwargs)[source]

Encodes the given value into bytes.

Parameters
  • args – Additional positional arguments.

  • kwargs – Additional named arguments.

Returns

A bytes instance.

Return type

bytes

abstract classmethod decode(data, *args, **kwargs)[source]

Decodes the given bytes data.

Parameters

data (bytes) – bytes data to be decoded.

Returns

De decoded data.

Return type

Any