Documentation ¶
Index ¶
- type Buffer
- func (b *Buffer) Age() time.Duration
- func (b *Buffer) Bytes() int64
- func (b *Buffer) Close() error
- func (b *Buffer) Flush() error
- func (b *Buffer) Partition() int32
- func (b *Buffer) Topic() string
- func (b *Buffer) Write(data []byte) (int, error)
- func (b *Buffer) WriteMessage(msg *sarama.ConsumerMessage) (int, error)
- func (b *Buffer) Writes() int64
- type Config
- type Flush
- type Reason
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
Buffer represents a 1:N on-disk buffer.
func New ¶
New buffer for topic and partition. The path given is used for the base of the filenames created, which append ".{pid}.{id}.{fid}".
func (*Buffer) WriteMessage ¶
func (b *Buffer) WriteMessage(msg *sarama.ConsumerMessage) (int, error)
type Config ¶
type Config struct { TempDir string // Where to store temporary files FlushWrites int64 // Flush after N writes, zero to disable FlushBytes int64 // Flush after N bytes, zero to disable FlushInterval time.Duration // Flush after duration, zero to disable BufferSize int // Buffer size for writes Queue chan *Flush // Queue of flushed files }
Config for disk buffer.
Click to show internal directories.
Click to hide internal directories.