binaryserialization

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeAccessToken

func DeserializeAccessToken(payload []byte) (*iggcon.RawPersonalAccessToken, error)

func DeserializeAccessTokens

func DeserializeAccessTokens(payload []byte) ([]iggcon.PersonalAccessTokenInfo, error)

func DeserializeClient

func DeserializeClient(payload []byte) *iggcon.ClientInfoDetails

func DeserializeClients

func DeserializeClients(payload []byte) ([]iggcon.ClientInfo, error)

func DeserializeConsumerGroup

func DeserializeConsumerGroup(payload []byte) *iggcon.ConsumerGroupDetails

func DeserializeConsumerGroupAssignment added in v0.9.0

func DeserializeConsumerGroupAssignment(payload []byte) (*iggcon.ConsumerGroupAssignment, error)

DeserializeConsumerGroupAssignment decodes [generation u64][partitions_count u32][partition_id u32 x n]. An empty payload means the client is not a member of the group, reported as ErrConsumerGroupMemberNotFound. A member holding no partition arrives as a header with a zero count and decodes to an empty Partitions slice.

func DeserializeConsumerGroups

func DeserializeConsumerGroups(payload []byte) []iggcon.ConsumerGroup

func DeserializeFetchMessagesResponse

func DeserializeFetchMessagesResponse(payload []byte, compression iggcon.IggyMessageCompression) (*iggcon.PolledMessage, error)

DeserializeFetchMessagesResponse decodes a poll reply: the 40-byte prefix followed by batch records ([256-byte batch header][frames]) walked by their batch length, with each frame's deltas resolved to absolute values. A truncated body is a decode error rather than a shorter batch: silently dropping the tail would let a consumer that commits CurrentOffset skip messages it never saw. Uncompressed payloads and user headers alias the reply buffer; retaining those slices pins it. S2 payloads are copied.

func DeserializeFetchSections added in v0.10.0

func DeserializeFetchSections(payload []byte, compression iggcon.IggyMessageCompression) ([]iggcon.FetchMessagesSection, error)

DeserializeFetchSections decodes a fetch reply, [sections_count u32][section header x n][records of each section], into its sections in reply order. The records of each section stay encoded and alias payload, and each section keeps compression for their decode. A refused section carries a nonzero status and no records, and the records of all sections fill the body exactly.

func DeserializeLogInResponse

func DeserializeLogInResponse(payload []byte) *iggcon.IdentityInfo

func DeserializeMetadataChanges added in v0.10.0

func DeserializeMetadataChanges(payload []byte) (*iggcon.MetadataChanges, error)

DeserializeMetadataChanges reads a GetMetadataChanges response.

Wire format: [status:u8][phase:u8][has_log_id:u8][log_id:u128] [oldest_op:u64][retained_since:u64][head_op:u64][has_next:u8][cursor:44] [has_more:u8][records_count:u32][record]*[items_count:u32][item]* [token_len:u16][token]. Bodies are decoded strictly: unknown reason codes, presence bytes other than 0 and 1, a known kind under another group and trailing body bytes are refused, while a group or kind this build does not know is kept with its raw body. Every refusal wraps ierror.ErrInvalidFormat.

func DeserializeOffset

func DeserializeOffset(payload []byte) *iggcon.ConsumerOffsetInfo

func DeserializeOptionSpecs added in v0.9.0

func DeserializeOptionSpecs(payload []byte) ([]iggcon.OptionSpec, error)

DeserializeOptionSpecs reads a DescribeOptions response.

Wire format: [count:u32][ [key_len:u8][key][kind:u8][flags:u8] [default_len:u32][default][description_len:u32][description] ]*

func DeserializePartition

func DeserializePartition(payload []byte, position int) (iggcon.PartitionContract, int, error)

func DeserializeSectionMessages added in v0.10.0

func DeserializeSectionMessages(section iggcon.FetchMessagesSection) (*iggcon.PolledMessage, error)

DeserializeSectionMessages decodes the records of a served fetch section as DeserializeFetchMessagesResponse decodes a poll reply, with the compression of the section and the same aliasing. A refused section returns its Err.

func DeserializeSendMessagesConfirmations added in v0.9.0

func DeserializeSendMessagesConfirmations(payload []byte) (*iggcon.SendMessagesResponse, error)

DeserializeSendMessagesConfirmations decodes [count u32] followed by count confirmation entries. An empty payload is an empty list. Trailing bytes are a decode error, because a frame the client cannot account for means the stream is out of sync.

func DeserializeStream

func DeserializeStream(payload []byte) (*iggcon.StreamDetails, error)

func DeserializeStreams

func DeserializeStreams(payload []byte) ([]iggcon.Stream, error)

func DeserializeToConsumerGroup

func DeserializeToConsumerGroup(payload []byte, position int) (*iggcon.ConsumerGroup, int)

func DeserializeToConsumerGroupMember added in v0.6.0

func DeserializeToConsumerGroupMember(payload []byte, position int) (iggcon.ConsumerGroupMember, int)

func DeserializeToStream

func DeserializeToStream(payload []byte, position int) (iggcon.Stream, int, error)

func DeserializeToTopic

func DeserializeToTopic(payload []byte, position int) (iggcon.Topic, int, error)

func DeserializeTopic

func DeserializeTopic(payload []byte) (*iggcon.TopicDetails, error)

func DeserializeTopics

func DeserializeTopics(payload []byte) ([]iggcon.Topic, error)

func DeserializeUser

func DeserializeUser(payload []byte) (*iggcon.UserInfoDetails, error)

func DeserializeUsers

func DeserializeUsers(payload []byte) ([]iggcon.UserInfo, error)

func MapClientInfo

func MapClientInfo(payload []byte, position int) (iggcon.ClientInfo, int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL