watcher

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type EventType
	Data interface{}
}

type EventType

type EventType string

EventType defines the possible types of events.

const (
	Added    EventType = "ADDED"
	Modified EventType = "MODIFIED"
	Deleted  EventType = "DELETED"
	Error    EventType = "ERROR"
)

type IWatcher

type IWatcher interface {
	Stop()
	ResultChan() <-chan Event
}

type Watcher

type Watcher struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStreamWatcher

func NewStreamWatcher(reqder io.ReadCloser) *Watcher

func (*Watcher) ResultChan

func (w *Watcher) ResultChan() <-chan Event

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

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