monitor

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 8 Imported by: 13

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"`
	ResourceType string                 `json:"resourceType"`
	ResourceID   string                 `json:"resourceId"`
	Data         map[string]interface{} `json:"data"`
}

type Monitor

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

func New

func (*Monitor) Get

func (m *Monitor) Get(resourceType, resourceID string, obj interface{}) (bool, 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