Skip to main content

Crate iggy_common

Crate iggy_common 

Source

Modules§

change_password
create_consumer_group
create_partitions
create_personal_access_token
create_stream
create_topic
create_user
defaults
delete_consumer_group
delete_consumer_offset
delete_partitions
delete_personal_access_token
delete_segments
delete_stream
delete_topic
delete_user
flush_unsaved_buffer
get_client
get_clients
get_cluster_metadata
get_consumer_group
get_consumer_groups
get_consumer_offset
get_me
get_personal_access_tokens
get_snapshot
get_stats
get_stream
get_streams
get_topic
get_topics
get_user
get_users
header
join_consumer_group
leave_consumer_group
locking
login_user
login_with_personal_access_token
logout_user
message
partitioning
partitioning_kind
ping
poll_messages
polled_messages
polling_kind
polling_strategy
purge_stream
purge_topic
random_id
send_messages
sharding
store_consumer_offset
text
update_permissions
update_stream
update_topic
update_user

Structs§

Aes256GcmEncryptor
Args
The arguments used by the ClientProviderConfig to create a client.
ArgsOptional
The arguments used by the ClientProviderConfig to create a client. We are not using default values here because we want to be able to distinguish between the default value and the value that was not provided by the user. This allows us to fallback to values provided in contexts.toml.
CacheMetrics
Cache metrics for a specific partition
CacheMetricsKey
Key for identifying a specific partition’s cache metrics
ClientInfo
ClientInfo represents the information about a client. It consists of the following fields:
ClientInfoDetails
ClientInfoDetails represents the detailed information about a client. It consists of the following fields:
ClusterMetadata
Represents metadata of all nodes in the cluster.
ClusterNode
ConnectionString
ConnectionStringUtils
ConnectionStringUtils is a utility struct for connection strings.
Consumer
Consumer represents the type of consumer that is consuming a message. It can be either a Consumer or a ConsumerGroup. It consists of the following fields:
ConsumerGroup
ConsumerGroup represents the information about a consumer group. It consists of the following fields:
ConsumerGroupDetails
ConsumerGroupDetails represents the detailed information about a consumer group. It consists of the following fields:
ConsumerGroupId
ConsumerGroupInfo
ConsumerGroupInfo represents the information about a consumer group. It consists of the following fields:
ConsumerGroupMember
ConsumerGroupMember represents the information about a consumer group member. It consists of the following fields:
ConsumerGroupOffsets
ConsumerOffset
ConsumerOffsetInfo
ConsumerOffsetInfo represents the information about a consumer offset. It consists of the following fields:
ConsumerOffsets
DateTime
ISO 8601 combined date and time with time zone.
FlushUnsavedBuffer
FlushUnsavedBuffer command is used to force a flush of unsaved_buffer to disk for specific stream -> topic -> partition.
GetClusterMetadata
GetClusterMetadata command is used to retrieve cluster metadata including available nodes, their roles, and connection information.
GlobalPermissions
GlobalPermissions are applied to all streams without a need to specify them one by one in the streams field.
HeaderEntry
HeaderField
A typed header field that can be used as either a key or value in message headers.
HttpClientConfig
Configuration for the HTTP client.
HttpClientConfigBuilder
The builder for the HttpClientConfig configuration. Allows configuring the HTTP client with custom settings or using defaults:
HttpConnectionStringOptions
Identifier
Identifier represents the unique identifier of the resources such as stream, topic, partition, user etc. It consists of the following fields:
IdentityInfo
IdentityInfo represents the information about an identity. It consists of the following fields:
IggyByteSize
A struct for representing byte sizes with various utility functions.
IggyDuration
A struct for representing time durations with various utility functions.
IggyIndex
IggyIndexView
View into a single index entry in a binary buffer. Provides zero-copy access to index data.
IggyIndexes
A container for binary-encoded index data. Optimized for efficient storage and I/O operations.
IggyIndexesMut
A container for binary-encoded index data. Optimized for efficient storage and I/O operations.
IggyMessage
A message stored in the Iggy messaging system.
IggyMessageHeader
IggyMessageHeaderView
A read-only, typed view into a message header in a raw buffer.
IggyMessageHeaderViewMut
A typed, in-place view of a raw header in a buffer
IggyMessageView
A immutable view of a message.
IggyMessageViewIterator
Iterator over immutable message views in a buffer.
IggyMessageViewMut
A mutable view of a message for in-place modifications
IggyMessageViewMutIterator
Iterator over mutable message views in a buffer
IggyMessagesBatch
An immutable messages container that holds a buffer of messages
IggyMessagesBatchMut
A container for mutable messages that are being prepared for persistence.
IggyMessagesBatchSet
A container for multiple IggyMessagesBatch objects
IggyMessagesBatchSetInFlight
Holds batches that are being written to disk.
IggyPollMetadata
IggyTimestamp
A struct that represents a timestamp.
IndexReader
A dedicated struct for reading from the index file.
IndexWriter
A dedicated struct for writing to the index file.
KeyMarker
MemoryPool
A memory pool that maintains fixed-size buckets for reusing BytesMut buffers.
MemoryPoolConfigOther
Configuration for the memory pool.
MessageDeduplicator
MessagesReader
A dedicated struct for reading from the messages file.
MessagesWriter
A dedicated struct for writing to the messages file.
Partition
Partition represents the information about a partition. It consists of the following fields:
PartitionStats
Partitioning
Partitioning is used to specify to which partition the messages should be sent. It has the following kinds:
Permissions
Permissions is used to define the permissions of a user. It consists of global permissions and stream permissions. Global permissions are applied to all streams. Stream permissions are applied to a specific stream.
PersonalAccessToken
PersonalAccessTokenInfo
PersonalAccessToken represents the personal access token. It does not contain the token itself, but the information about the token. It consists of the following fields:
PollMessages
PollMessages command is used to poll messages from a topic in a stream. It has additional payload:
PolledMessages
The wrapper on top of the collection of messages that are polled from the partition. It consists of the following fields:
PollingStrategy
PollingStrategy specifies from where to start polling messages. It has the following kinds:
PooledBuffer
A buffer wrapper that participates in memory pooling.
QuicClientConfig
Configuration for the QUIC client.
QuicClientConfigBuilder
Builder for the QUIC client configuration.
QuicClientReconnectionConfig
QuicConnectionStringOptions
QuicSender
RawPersonalAccessToken
RawPersonalAccessToken represents the raw personal access token - the secured token which is returned only once during the creation. It consists of the following fields:
Segment
SegmentStorage
SemanticVersion
SendMessages
SendMessages command is used to send messages to a topic in a stream. It has additional payload:
Snapshot
Stats
Stats represents the statistics and details of the server and running process.
Stream
Stream represents the highest level of logical separation of data. It consists of the following fields:
StreamDetails
StreamDetails represents the detailed information about the stream. It consists of the following fields:
StreamPermissions
StreamPermissions are applied to a specific stream and its all topics. If you want to define granular permissions for each topic, use the topics field. These permissions do not override the global permissions, but extend them, and allow more granular control over the streams and the users that can access them.
StreamStats
TcpClientConfig
Configuration for the TCP client.
TcpClientConfigBuilder
Builder for the TCP client configuration. Allows configuring the TCP client with custom settings or using defaults:
TcpClientReconnectionConfig
TcpConnectionStringOptions
TcpSender
TcpTlsSender
TokenInfo
TokenInfo represents the details of the access token. It consists of the following fields:
Topic
Topic represents the medium level of logical separation of data as it’s a part of the stream. It consists of the following fields:
TopicDetails
TopicDetails represents the detailed information about the topic. It consists of the following fields:
TopicPermissions
TopicPermissions are applied to a specific topic of a stream. This is the lowest level of permissions.
TopicStats
TransportEndpoints
UserInfo
UserInfo represents the basic information about the user. It consists of the following fields:
UserInfoDetails
UserInfoDetails represents the detailed information about the user. It consists of the following fields:
Utc
The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
ValueMarker
WebSocketClientConfig
Configuration for the WebSocket client.
WebSocketClientConfigBuilder
Builder for the WebSocket client configuration. Allows configuring the WebSocket client with custom settings or using defaults:
WebSocketClientReconnectionConfig
WebSocket client reconnection configuration. It consists of the following fields:
WebSocketConfig
WebSocket-specific configuration that maps to tungstenite options. Uses same structure as server-side WebSocketConfig but for client.
WebSocketConnectionStringOptions
WebSocketSender
WebSocketTlsSender

Enums§

AutoLogin
ClientError
The error type for the client.
ClientState
The state of the client.
ClusterNodeRole
Node role within the cluster
ClusterNodeStatus
Current status of a node
CompressionAlgorithm
Supported compression algorithms
ConsumerKind
ConsumerKind is an enum that represents the type of consumer.
Credentials
DiagnosticEvent
EncryptorKind
HeaderKind
Indicates the type of value stored in a HeaderField.
IdKind
IdKind represents the kind of the identifier.
IggyError
IggyErrorDiscriminants
IggyExpiry
Helper enum for various time-based expiry related functionalities
MaxTopicSize
PartitioningKind
PartitioningKind is an enum which specifies the kind of partitioning and is used by Partitioning.
PollingKind
PollingKind is an enum which specifies from where to start polling messages and is used by PollingStrategy.
SenderKind
SnapshotCompression
Enum representing the various compression methods available for snapshots.
SystemSnapshotType
Enum representing the different types of system snapshots that can be taken.
TransportProtocol
UserStatus
UserStatus represents the status of the user.

Constants§

CHANGE_PASSWORD
CHANGE_PASSWORD_CODE
CREATE_CONSUMER_GROUP
CREATE_CONSUMER_GROUP_CODE
CREATE_PARTITIONS
CREATE_PARTITIONS_CODE
CREATE_PERSONAL_ACCESS_TOKEN
CREATE_PERSONAL_ACCESS_TOKEN_CODE
CREATE_STREAM
CREATE_STREAM_CODE
CREATE_TOPIC
CREATE_TOPIC_CODE
CREATE_USER
CREATE_USER_CODE
DELETE_CONSUMER_GROUP
DELETE_CONSUMER_GROUP_CODE
DELETE_CONSUMER_OFFSET
DELETE_CONSUMER_OFFSET_CODE
DELETE_PARTITIONS
DELETE_PARTITIONS_CODE
DELETE_PERSONAL_ACCESS_TOKEN
DELETE_PERSONAL_ACCESS_TOKEN_CODE
DELETE_SEGMENTS
DELETE_SEGMENTS_CODE
DELETE_STREAM
DELETE_STREAM_CODE
DELETE_TOPIC
DELETE_TOPIC_CODE
DELETE_USER
DELETE_USER_CODE
FLUSH_UNSAVED_BUFFER
FLUSH_UNSAVED_BUFFER_CODE
GET_CLIENT
GET_CLIENTS
GET_CLIENTS_CODE
GET_CLIENT_CODE
GET_CLUSTER_METADATA
GET_CLUSTER_METADATA_CODE
GET_CONSUMER_GROUP
GET_CONSUMER_GROUPS
GET_CONSUMER_GROUPS_CODE
GET_CONSUMER_GROUP_CODE
GET_CONSUMER_OFFSET
GET_CONSUMER_OFFSET_CODE
GET_ME
GET_ME_CODE
GET_PERSONAL_ACCESS_TOKENS
GET_PERSONAL_ACCESS_TOKENS_CODE
GET_SNAPSHOT_FILE
GET_SNAPSHOT_FILE_CODE
GET_STATS
GET_STATS_CODE
GET_STREAM
GET_STREAMS
GET_STREAMS_CODE
GET_STREAM_CODE
GET_TOPIC
GET_TOPICS
GET_TOPICS_CODE
GET_TOPIC_CODE
GET_USER
GET_USERS
GET_USERS_CODE
GET_USER_CODE
IGGY_MESSAGE_CHECKSUM_OFFSET_RANGE
IGGY_MESSAGE_HEADERS_LENGTH_OFFSET_RANGE
IGGY_MESSAGE_HEADER_RANGE
IGGY_MESSAGE_HEADER_SIZE
IGGY_MESSAGE_ID_OFFSET_RANGE
IGGY_MESSAGE_OFFSET_OFFSET_RANGE
IGGY_MESSAGE_ORIGIN_TIMESTAMP_OFFSET_RANGE
IGGY_MESSAGE_PAYLOAD_LENGTH_OFFSET_RANGE
IGGY_MESSAGE_TIMESTAMP_OFFSET_RANGE
INDEX_SIZE
JOIN_CONSUMER_GROUP
JOIN_CONSUMER_GROUP_CODE
LEAVE_CONSUMER_GROUP
LEAVE_CONSUMER_GROUP_CODE
LOGIN_USER
LOGIN_USER_CODE
LOGIN_WITH_PERSONAL_ACCESS_TOKEN
LOGIN_WITH_PERSONAL_ACCESS_TOKEN_CODE
LOGOUT_USER
LOGOUT_USER_CODE
MAX_PAYLOAD_SIZE
Maximum allowed size in bytes for a message payload.
MAX_USER_HEADERS_SIZE
Maximum allowed size in bytes for user-defined headers.
PING
PING_CODE
POLL_MESSAGES
POLL_MESSAGES_CODE
PURGE_STREAM
PURGE_STREAM_CODE
PURGE_TOPIC
PURGE_TOPIC_CODE
SEC_IN_MICRO
SEND_MESSAGES
SEND_MESSAGES_CODE
STORE_CONSUMER_OFFSET
STORE_CONSUMER_OFFSET_CODE
UPDATE_PERMISSIONS
UPDATE_PERMISSIONS_CODE
UPDATE_STREAM
UPDATE_STREAM_CODE
UPDATE_TOPIC
UPDATE_TOPIC_CODE
UPDATE_USER
UPDATE_USER_CODE
UTC_TIME_FORMAT

Statics§

MEMORY_POOL
Global memory pool instance. Use memory_pool() to access it.

Traits§

BytesSerializable
The trait represents the logic responsible for serializing and deserializing the struct to and from bytes.
Command
ConnectionStringOptions
Encryptor
Partitioner
The trait represent the logic responsible for calculating the partition ID and is used by the IggyClient. This might be especially useful when the partition ID is not constant and might be calculated based on the stream ID, topic ID and other parameters.
Sender
Sizeable
Trait for types that return their size in bytes.
Validatable
A trait for validating a type.

Functions§

calculate_32
calculate_256
calculate_checksum
deserialize_headers
generate_self_signed_certificate
Generates a self-signed certificate for the given domain. Returns a tuple of (certificate chain, private key).
get_name_from_code
memory_pool
Retrieve the global MemoryPool instance. Panics if not yet initialized.
serialize_headers
write_batch_frozen
Vectored write frozen (immutable) batches to file.

Type Aliases§

AtomicUserId
AtomicUserId represents the unique identifier (numeric) of the user which can be safely modified concurrently across threads
ChronoDuration
Alias of TimeDelta.
HeaderKey
Type alias for header keys in user-defined message headers.
HeaderValue
Type alias for header values in user-defined message headers.
PersonalAccessTokenExpiry
UserHeaders
Type alias for a collection of user-defined message headers.
UserId
UserId represents the unique identifier (numeric) of the user.