resource

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	OperationUndefined = -1
	OperationAdded     = Operation(iota)
	OperationModified
	OperationDeleted
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Assets

type Assets map[string]storage.Object

func NewAssets

func NewAssets(assets []storage.Object) Assets

func (Assets) Added

func (a Assets) Added(assets Assets, fn func(object storage.Object))

func (Assets) Deleted

func (a Assets) Deleted(assets Assets, fn func(object storage.Object))

func (Assets) Modified

func (a Assets) Modified(assets Assets, fn func(object storage.Object))

type Operation

type Operation int

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

func New

func New(baseURL string, checkFrequency time.Duration) *Tracker

func (*Tracker) Notify

func (m *Tracker) Notify(ctx context.Context, fs afs.Service, callback func(URL string, operation Operation)) error

Notify returns true if resource under base URL have changed

Jump to

Keyboard shortcuts

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