gateway

package
v0.0.0-...-c161377 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name     string          `yaml:"name"`
	Location string          `yaml:"location,omitempty"`
	Devices  []*DeviceConfig `yaml:"devices"`
}

Config ...

type DeviceConfig

type DeviceConfig struct {
	Kind       string `yaml:"kind"`
	DeviceID   string `yaml:"deviceID"`
	PrivateKey string `yaml:"privateKey"`
	Algorithm  string `yaml:"algorithm"`
}

DeviceConfig ...

type Gateway

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

Gateway stores the connected devices.

func Start

func Start(config cloud.Config) (*Gateway, error)

Start initializes the Gateway and connects to the local broker for configuration details.

func (*Gateway) Algorithm

func (g *Gateway) Algorithm() string

Algorithm ...

func (*Gateway) DeviceID

func (g *Gateway) DeviceID() string

DeviceID ...

func (*Gateway) Devices

func (g *Gateway) Devices() map[string]cloud.Device

Devices ...

func (*Gateway) Location

func (g *Gateway) Location() string

Location ...

func (*Gateway) Name

func (g *Gateway) Name() string

Name ...

func (*Gateway) PrivateKey

func (g *Gateway) PrivateKey() string

PrivateKey ...

func (*Gateway) ProjectID

func (g *Gateway) ProjectID() string

ProjectID ...

func (*Gateway) Region

func (g *Gateway) Region() string

Region ...

func (*Gateway) RegistryID

func (g *Gateway) RegistryID() string

RegistryID ...

func (*Gateway) Stop

func (g *Gateway) Stop() error

Stop disconnects from the local broker and stops each device of the gateway.

func (*Gateway) StorePath

func (g *Gateway) StorePath() string

StorePath ...

Jump to

Keyboard shortcuts

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