wal.go 656 B

1234567891011121314151617181920212223242526
  1. package walimpls
  2. import (
  3. "context"
  4. "github.com/milvus-io/milvus/pkg/streaming/util/message"
  5. "github.com/milvus-io/milvus/pkg/streaming/util/types"
  6. )
  7. type WALImpls interface {
  8. // WALName returns the name of the wal.
  9. WALName() string
  10. // Channel returns the channel assignment info of the wal.
  11. // Should be read-only.
  12. Channel() types.PChannelInfo
  13. // Append writes a record to the log.
  14. Append(ctx context.Context, msg message.MutableMessage) (message.MessageID, error)
  15. // Read returns a scanner for reading records from the wal.
  16. Read(ctx context.Context, opts ReadOption) (ScannerImpls, error)
  17. // Close closes the wal instance.
  18. Close()
  19. }