Documentation ¶
Index ¶
- Variables
- type ByteReader
- type Client
- func (c *Client) BackupLog(name string, w io.Writer) (err error)
- func (c *Client) CreateLog(name string, config api.LogConfig) (r api.CreateLogResponse, err error)
- func (c *Client) DeleteLog(name string) (err error)
- func (c *Client) GetLog(name string) (r api.GetLogResponse, err error)
- func (c *Client) ListLogs() (r api.ListLogsResponse, err error)
- func (c *Client) NewConsumer(name string, params ConsumerParams, options ConsumerOptions) (co *Consumer, err error)
- func (c *Client) NewProducer(name string, options ProducerOptions) (p *Producer, err error)
- func (c *Client) ReadRecord(logName string, params api.ReadRecordParams) (r log.Record, err error)
- func (c *Client) ReadRecordsBatch(logName string, params api.ReadRecordsBatchParams, bufferSize int, timeout int, ...) (err error)
- func (c *Client) ReadRecordsTCP(name string, params api.ReadRecordsTCPParams, flag recio.IOMode, ...) (tr *tcp.TCPReader, err error)
- func (c *Client) RestoreLog(name string, r io.Reader) (err error)
- func (c *Client) TruncateLog(name string) (err error)
- func (c *Client) WriteRecord(logName string, record log.Record) (r api.WriteRecordResponse, err error)
- func (c *Client) WriteRecordsBatch(logName string, bufferSize int, fn RecordsWriterHandler) (r api.WriteRecordsBatchResponse, err error)
- func (c *Client) WriteRecordsTCP(logName string, flag recio.IOMode, writeBufferSize int, timeout int) (tw *tcp.TCPWriter, err error)
- type Consumer
- type ConsumerOptions
- type ConsumerParams
- type ErrorHandler
- type Producer
- type ProducerOptions
- type RecordsReaderHandler
- type RecordsWriterHandler
- type SyncHandler
- type Whence
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultConsumerOptions = ConsumerOptions{ ReadTimeout: 30, ReadBufferSize: 1 << 20, WriteBufferSize: 1 << 20, IOMode: recio.ModeAuto, } DefaultConsumerParams = ConsumerParams{ Whence: SeekOrigin, Position: 0, Count: -1, Follow: false, } )
View Source
var (
DefaultLogConfig = api.LogConfig{
MaxRecordSize: 1 << 20,
IndexAfterSize: 1 << 20,
SegmentMaxCount: -1,
SegmentMaxSize: 1 << 30,
SegmentMaxAge: -1,
LogMaxCount: -1,
LogMaxSize: -1,
LogMaxAge: -1,
}
)
View Source
var ( DefaultProducerOptions = ProducerOptions{ ReadTimeout: 30, ReadBufferSize: 1 << 20, WriteBufferSize: 1 << 20, IOMode: recio.ModeAuto, } )
Functions ¶
This section is empty.
Types ¶
type ByteReader ¶
type ByteReader struct {
// contains filtered or unexported fields
}
func NewByteReader ¶
func NewByteReader(r io.Reader) (br *ByteReader)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) NewConsumer ¶
func (c *Client) NewConsumer(name string, params ConsumerParams, options ConsumerOptions) (co *Consumer, err error)
func (*Client) NewProducer ¶
func (c *Client) NewProducer(name string, options ProducerOptions) (p *Producer, err error)
func (*Client) ReadRecord ¶
func (*Client) ReadRecordsBatch ¶
func (c *Client) ReadRecordsBatch(logName string, params api.ReadRecordsBatchParams, bufferSize int, timeout int, fn RecordsReaderHandler) (err error)
func (*Client) ReadRecordsTCP ¶
func (*Client) TruncateLog ¶
func (*Client) WriteRecord ¶
func (*Client) WriteRecordsBatch ¶
func (c *Client) WriteRecordsBatch(logName string, bufferSize int, fn RecordsWriterHandler) (r api.WriteRecordsBatchResponse, err error)
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func (*Consumer) HandleError ¶
func (co *Consumer) HandleError(h ErrorHandler)
type ConsumerOptions ¶
type ConsumerParams ¶
type ErrorHandler ¶
type ErrorHandler func(err error)
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
func (*Producer) HandleError ¶
func (p *Producer) HandleError(h ErrorHandler)
func (*Producer) HandleSync ¶
func (p *Producer) HandleSync(h SyncHandler)
type ProducerOptions ¶
type RecordsReaderHandler ¶
type RecordsWriterHandler ¶
type SyncHandler ¶
type SyncHandler func(syncProgress log.SyncProgress)
Click to show internal directories.
Click to hide internal directories.