source

package
v0.0.0-...-3030a97 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWatcherStopped is returned when source watcher has been stopped
	ErrWatcherStopped = errors.New("watcher stopped")
)

Functions

This section is empty.

Types

type ChangeSet

type ChangeSet struct {
	Data      []byte
	Checksum  string
	Format    string
	Source    string
	Timestamp time.Time
}

ChangeSet represents a set of changes from a source

func (*ChangeSet) Sum

func (c *ChangeSet) Sum() string

Sum returns the md5 checksum of the ChangeSet data

type Option

type Option interface {
	// contains filtered or unexported methods
}

type OptionFunc

type OptionFunc func(*Options)

type Options

type Options struct {
	Context context.Context
}

func NewOptions

func NewOptions(opts ...Option) Options

type Source

type Source interface {
	Read() (*ChangeSet, error)
	Watch() (Watcher, error)
	String() string
}

type Watcher

type Watcher interface {
	Next() (*ChangeSet, error)
	Stop() error
}

Watcher watches a source for changes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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