manager

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 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 CommonResourceEventHandler

type CommonResourceEventHandler struct {
	// contains filtered or unexported fields
}

CommonResourceEventHandler can be used by configmapManager and podManager

func NewCommonResourceEventHandler

func NewCommonResourceEventHandler(events chan watch.Event) *CommonResourceEventHandler

NewCommonResourceEventHandler create CommonResourceEventHandler used by configmapManager and podManager

func (*CommonResourceEventHandler) OnAdd

func (c *CommonResourceEventHandler) OnAdd(obj interface{})

OnAdd handle Add event

func (*CommonResourceEventHandler) OnDelete

func (c *CommonResourceEventHandler) OnDelete(obj interface{})

OnDelete handle Delete event

func (*CommonResourceEventHandler) OnUpdate

func (c *CommonResourceEventHandler) OnUpdate(oldObj, newObj interface{})

OnUpdate handle Update event

type ConfigMapManager

type ConfigMapManager struct {
	// ConfigMap, key is nodeID, value is configmap
	ConfigMap sync.Map
}

ConfigMapManager is a manager for configmap of deviceProfile

func NewConfigMapManager

func NewConfigMapManager() *ConfigMapManager

NewConfigMapManager is function to return new ConfigMapManager

type DeviceManager

type DeviceManager struct {

	// Device, key is device.Name, value is *v1alpha1.Device{}
	Device sync.Map
	// contains filtered or unexported fields
}

DeviceManager is a manager watch device change event

func NewDeviceManager

func NewDeviceManager(crdClient *rest.RESTClient, namespace string) (*DeviceManager, error)

NewDeviceManager create DeviceManager from config

func (*DeviceManager) Events

func (dmm *DeviceManager) Events() chan watch.Event

Events return a channel, can receive all device event

type DeviceModelManager

type DeviceModelManager struct {

	// DeviceModel, key is DeviceModel.Name, value is *v1alpha1.DeviceModel{}
	DeviceModel sync.Map
	// contains filtered or unexported fields
}

DeviceModelManager is a manager watch DeviceModel change event

func NewDeviceModelManager

func NewDeviceModelManager(crdClient *rest.RESTClient, namespace string) (*DeviceModelManager, error)

NewDeviceModelManager create DeviceModelManager from config

func (*DeviceModelManager) Events

func (dmm *DeviceModelManager) Events() chan watch.Event

Events return a channel, can receive all DeviceModel event

type Manager

type Manager interface {
	Events() chan watch.Event
}

Manager define the interface of a Manager, configmapManager and podManager implement it

Jump to

Keyboard shortcuts

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