watch

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociatedEventStream

type AssociatedEventStream chan update.AssociatedUpdate

type GenericWatchStorage

type GenericWatchStorage struct {
	storage.Storage
	// contains filtered or unexported fields
}

GenericWatchStorage implements the WatchStorage interface

func (*GenericWatchStorage) Close

func (s *GenericWatchStorage) Close() error

func (*GenericWatchStorage) Delete

Suspend delete events during Delete

func (*GenericWatchStorage) Patch

func (s *GenericWatchStorage) Patch(gvk schema.GroupVersionKind, uid runtime.UID, patch []byte) error

Suspend modify events during Patch

func (*GenericWatchStorage) Set

Suspend modify events during Set

func (*GenericWatchStorage) SetEventStream

func (s *GenericWatchStorage) SetEventStream(eventStream AssociatedEventStream)

type WatchStorage

type WatchStorage interface {
	// WatchStorage extends the Storage interface
	storage.Storage
	// GetTrigger returns a hook that can be used to detect a watch event
	SetEventStream(AssociatedEventStream)
}

WatchStorage is an extended Storage implementation, which provides a watcher for watching changes in the directory managed by the embedded Storage's RawStorage. If the RawStorage is a MappedRawStorage instance, it's mappings will automatically be updated by the WatchStorage. Update events are sent to the given event stream.

func NewGenericWatchStorage

func NewGenericWatchStorage(s storage.Storage) (WatchStorage, error)

NewGenericWatchStorage constructs a new WatchStorage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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