loader

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDir

func GetDir(path string) string

Types

type Loader

type Loader interface {
	Load(...source.Source) error
	Watcher() Watcher
	Snapshot() SnapShot
	EnableReaderPanicSkip()
}

func NewLoader

func NewLoader(opts ...Option) Loader

type Option

type Option func(options *Options)

func WithReader

func WithReader(r reader.Reader) Option

func WithSource

func WithSource(s source.Source) Option

type Options

type Options struct {
	Source  []source.Source
	Context context.Context
	Reader  reader.Reader
}

type SnapShot

type SnapShot struct {
	Version    time.Time
	LastChange *source.ChangeSet
}

type Watcher

type Watcher interface {
	//Update(snapshot SnapShot)
	Next() (*SnapShot, error)
	Stop() error
}

Jump to

Keyboard shortcuts

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