monitor

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: Apache-2.0 Imports: 9 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"`
	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 New(c *client.RancherClient) *Monitor

func (*Monitor) Get

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

func (*Monitor) Start

func (m *Monitor) Start() 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