Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init initializes the wal accesser with the given etcd client. should be called before any other operations.
func SetWAL ¶
func SetWAL(w WALAccesser)
Types ¶
type AppendResponse ¶
AppendResponse is the response of one append operation.
type AppendResponses ¶
type AppendResponses struct {
Responses []AppendResponse
}
AppendResponses is the response of append operation.
func (AppendResponses) IsAnyError ¶
func (a AppendResponses) IsAnyError() error
IsAnyError returns the first error in the responses.
type ReadOption ¶
type ReadOption struct { // VChannel is the target vchannel to read. VChannel string // DeliverPolicy is the deliver policy of the consumer. DeliverPolicy options.DeliverPolicy // DeliverFilters is the deliver filters of the consumer. DeliverFilters []options.DeliverFilter // Handler is the message handler used to handle message after recv from consumer. MessageHandler message.Handler }
type Scanner ¶
type Scanner interface { // Done returns a channel which will be closed when scanner is finished or closed. Done() <-chan struct{} // Error returns the error of the scanner. Error() error // Close the scanner, release the underlying resources. Close() }
Scanner is the interface for reading records from the wal.
type WALAccesser ¶
type WALAccesser interface { // Append writes a record to the log. // !!! Append didn't promise the order of the message and atomic write. Append(ctx context.Context, msgs ...message.MutableMessage) AppendResponses // Read returns a scanner for reading records from the wal. Read(ctx context.Context, opts ReadOption) Scanner }
WALAccesser is the interfaces to interact with the milvus write ahead log.
Click to show internal directories.
Click to hide internal directories.