gateway

package module
v0.0.0-...-71aae07 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallHomeServer

func CallHomeServer(registrar *LocalRegistrar) node.Node

func InstallRegistrar

func InstallRegistrar(reg *LocalRegistrar, dev *device.Local) error

func RegistrarNode

func RegistrarNode(registrar *LocalRegistrar) node.Node

Types

type LocalRegistrar

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

func NewLocalRegistrar

func NewLocalRegistrar(proto device.ProtocolHandler) *LocalRegistrar

func (*LocalRegistrar) Device

func (gw *LocalRegistrar) Device(deviceId string) (device.Device, error)

func (*LocalRegistrar) LookupRegistration

func (gw *LocalRegistrar) LookupRegistration(deviceId string) (Registration, bool)

func (*LocalRegistrar) OnRegister

func (*LocalRegistrar) RegisterDevice

func (gw *LocalRegistrar) RegisterDevice(deviceId string, address string) error

func (*LocalRegistrar) RegistrationCount

func (gw *LocalRegistrar) RegistrationCount() int

type RegisterListener

type RegisterListener func(Registration)

type Registrar

type Registrar interface {
	RegistrationCount() int
	LookupRegistration(deviceId string) (Registration, bool)
	RegisterDevice(deviceId string, address string)
	OnRegister(l RegisterListener) nodeutil.Subscription
}

type Registration

type Registration struct {
	DeviceId string
	Address  string
	Device   device.Device
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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