event

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEOF = errors.New("EOF")

Functions

This section is empty.

Types

type Reader

type Reader interface {
	// Read returns the next event. Returns EOF when finished.
	Read(context.Context) (model.MXPGVKEvent, error)
	// Close closes the reader.
	Close() error
}

Reader is the interface for reading usage events. Read() must return EOF when there is nothing more to read. Callers must call Close() when finished reading.

type WindowIterator

type WindowIterator interface {
	// More returns true if there are more windows.
	More() bool
	// Next returns a reader and time range for the next window.
	Next() (Reader, time.Range, error)
}

WindowIterator is the interface for iterating through usage event readers for windows of time within a time range.

type Writer

type Writer interface {
	// Write writes an event.
	Write(model.MXPGVKEvent) error
}

Writer is the interface for reading usage events.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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