Documentation
¶
Index ¶
Constants ¶
View Source
const ( DS_NONE = pb.ReadResponse_DS_NONE DS_CLOUD = pb.ReadResponse_DS_CLOUD DS_DISK_STORE = pb.ReadResponse_DS_DISK_STORE DS_DISK_WAL = pb.ReadResponse_DS_DISK_WAL DS_MEMORY = pb.ReadResponse_DS_MEMORY )
Variables ¶
View Source
var ( ErrNotConnected = errors.New("client not connected or setup not complete") ErrBufferFull = errors.New("client request buffer is full") ErrRequestTimeout = errors.New("request timed out waiting for server response") ErrConnectionClosed = errors.New("connection closed while waiting for response") ErrInvalidResponse = errors.New("invalid or unexpected response from server") ErrServerSide = errors.New("server returned an error") ErrQueueNotFound = errors.New("queue not found on server") ErrReadStreamClosed = errors.New("read stream closed by server or connection error") ErrEntryNotFound = errors.New("entry not found") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Enqueue(queueID string, data []byte) (uintn.UintN, error)
EnqueuePack(queueID string, data [][]byte) ([]uintn.UintN, error)
ReadFromOffset(queueID string, offset uintn.UintN, limit uint64, step uint64, bufSize uint) *QueueRead
ReadFromTail(queueID string, offset uintn.UintN, limit uint64, step uint64, bufSize uint) *QueueRead
Follow(queueID string, target chan<- StreamEntry) <-chan error
}
type ConnectionStats ¶
type ConnectionStats struct {
TotalConnections int
HealthyReadConnections int
HealthyWriteConnections int
}
ConnectionStats holds statistics about the multi-client connections
type QueueRead ¶
type QueueRead struct {
Id uuid.UUID
Data chan StreamEntry
Err error
}
QueueRead represents a read operation from the queue (client-side)
type StreamEntry ¶
type StreamEntry struct {
ID StreamEntryId
Data []byte
DataSource DataSource
Err error
}
StreamEntry represents an entry in a stream with its associated metadata.
type StreamEntryId ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
pb
|
|
|
Package uintn provides a flexible unsigned integer type system that can represent u8, u16, u32, u64, or arbitrary precision values.
|
Package uintn provides a flexible unsigned integer type system that can represent u8, u16, u32, u64, or arbitrary precision values. |
Click to show internal directories.
Click to hide internal directories.