subscriber

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Once added in v0.19.0

func Once(w Watcher, s Subscription, logger *log.Entry, send chan *structs.Action, destroyCh chan interface{})

Once is a generic one-off query for Nomad

func Stream added in v0.19.0

func Stream(w Streamer, s Subscription, logger *log.Entry, send chan *structs.Action, destroyCh chan interface{})

Stream is a generic one-off query for Nomad

func Unwatch added in v0.19.0

func Unwatch(w Keyer, s Subscription, logger *log.Entry) error

Unwatch is a generic watcher for Nomad

func Watch added in v0.19.0

func Watch(w Watcher, s Subscription, logger *log.Entry, cfg *config.Config, send chan *structs.Action, destroyCh chan interface{})

Watch is a generic watcher for Nomad

Types

type Keyer added in v0.19.0

type Keyer interface {
	Key() string
}

Keyer interface

type Manager

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

Manager ...

func (*Manager) Clear

func (m *Manager) Clear()

Clear the list

func (*Manager) Count added in v0.19.0

func (m *Manager) Count() int64

func (*Manager) Subscribe

func (m *Manager) Subscribe(key string) chan interface{}

Subscribe ...

func (*Manager) Subscribed

func (m *Manager) Subscribed(key string) bool

Subscribed ...

func (*Manager) Subscriptions

func (m *Manager) Subscriptions() []string

Subscriptions ...

func (*Manager) Unsubscribe

func (m *Manager) Unsubscribe(key string) bool

Unsubscribe ...

type Streamer added in v0.19.0

type Streamer interface {
	Do(send chan *structs.Action, subscribeCh chan interface{}, destroyCh chan interface{}) (structs.Response, error)
	Key() string
	IsMutable() bool
	BackendType() string
}

Streamer interface

type Subscription added in v0.19.0

type Subscription interface {
	Subscribe(key string) chan interface{}
	Subscribed(key string) bool
	Unsubscribe(key string) bool
}

type Watcher added in v0.19.0

type Watcher interface {
	Do() (structs.Response, error)
	Key() string
	IsMutable() bool
	BackendType() string
}

Watcher interface

Jump to

Keyboard shortcuts

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