controller

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPCUA              = "opcua"
	Modbus             = "modbus"
	Bluetooth          = "bluetooth"
	CustomizedProtocol = "customized-protocol"

	DataTypeInt     = "int"
	DataTypeString  = "string"
	DataTypeDouble  = "double"
	DataTypeFloat   = "float"
	DataTypeBoolean = "boolean"
	DataTypeBytes   = "bytes"

	ConfigMapKind    = "ConfigMap"
	ConfigMapVersion = "v1"

	DeviceProfileConfigPrefix = "device-profile-config-"

	DeviceProfileJSON = "deviceProfile.json"
)

Constants for protocol, datatype, configmap, deviceProfile

View Source
const (
	// MergePatchType is patch type
	MergePatchType = "application/merge-patch+json"
	// ResourceTypeDevices is plural of device resource in apiserver
	ResourceTypeDevices = "devices"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceStatus

type DeviceStatus struct {
	Status v1alpha2.DeviceStatus `json:"status"`
}

DeviceStatus is structure to patch device status

type DownstreamController

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

DownstreamController watch kubernetes api server and send change to edge

func NewDownstreamController

func NewDownstreamController(crdInformerFactory crdinformers.SharedInformerFactory) (*DownstreamController, error)

NewDownstreamController create a DownstreamController from config

func (*DownstreamController) Start

func (dc *DownstreamController) Start() error

Start DownstreamController

type UpstreamController

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

UpstreamController subscribe messages from edge and sync to k8s api server

func NewUpstreamController

func NewUpstreamController(dc *DownstreamController) (*UpstreamController, error)

NewUpstreamController create UpstreamController from config

func (*UpstreamController) Start

func (uc *UpstreamController) Start() error

Start UpstreamController

Jump to

Keyboard shortcuts

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