monitor

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: Apache-2.0 Imports: 10 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 {
	Name string                 `json:"name"`
	Data map[string]interface{} `json:"data"`
}

func (*Event) ResourceID

func (e *Event) ResourceID() string

func (*Event) ResourceType

func (e *Event) ResourceType() string

type Monitor

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

func (*Monitor) Get

func (m *Monitor) Get(resourceType, resourceID string, obj interface{}) (bool, error)

func (*Monitor) Start

func (m *Monitor) Start(subscribeSchema *types.Schema) error

func (*Monitor) Subscribe

func (m *Monitor) Subscribe() *Subscription

func (*Monitor) Unsubscribe

func (m *Monitor) Unsubscribe(sub *Subscription)

type Subscription

type Subscription struct {
	C chan *Event
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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