streaming

package
v0.0.0-...-34e0b2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(c *clientv3.Client)

Init initializes the wal accesser with the given etcd client. should be called before any other operations.

func Release

func Release()

Release releases the resources of the wal accesser.

func SetWAL

func SetWAL(w WALAccesser)

Types

type AppendResponse

type AppendResponse struct {
	MessageID message.MessageID
	Error     error
}

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.

func WAL

func WAL() WALAccesser

WAL is the entrance to interact with the milvus write ahead log.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL