Discover Packages
github.com/ysimonson/pachyderm
src
server
pkg
watch
package
Version:
v1.8.1
Opens a new window with list of versions in this module.
Published: Dec 19, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Overview Index Constants Variables Functions Types CheckType(template, val) type Event type EventType type Watcher (e) Unmarshal(key, val) (e) UnmarshalPrev(key, val) MakeWatcher(eventCh, done) NewWatcher(ctx, client, trimPrefix, prefix, template) NewWatcherWithPrev(ctx, client, trimPrefix, prefix, template)
Documentation
¶
func CheckType(template proto.Message, val interface{}) error
type Event
type EventType
type Watcher
func MakeWatcher(eventCh chan *Event, done chan struct{}) Watcher
func NewWatcher(ctx context.Context, client *etcd.Client, trimPrefix, prefix string, ...) (Watcher, error)
func NewWatcherWithPrev(ctx context.Context, client *etcd.Client, trimPrefix, prefix string, ...) (Watcher, error)
CheckType checks to make sure val has the same type as template, unless
template is nil in which case it always returns nil.
Event is an event that occurred to an item in etcd.
Unmarshal unmarshals the item in an event into a protobuf message.
UnmarshalPrev unmarshals the prev item in an event into a protobuf
message.
EventType is the type of event
type Watcher interface {
Watch() <-chan *Event
Close()
}
Watcher ...
func MakeWatcher(eventCh chan *Event , done chan struct{}) Watcher
MakeWatcher returns a Watcher that uses the given event channel and done
channel internally to deliver events and signal closure, respectively.
NewWatcher watches a given etcd prefix for events.
NewWatcherWithPrev is like NewWatcher, except that the returned events
include the previous version of the values.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.