discoverymgr

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package discoverymgr provides functions to register local device to network and find other orchestration devices

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetNetwotkArgument

func SetNetwotkArgument() (hostIPAddr []string, netIface []net.Interface)

SetNetwotkArgument is used to set the IP address and interface of host

Types

type Discovery

type Discovery interface {
	StartDiscovery(UUIDpath string, platform string, executionType string) error
	StopDiscovery()
	DeleteDeviceWithIP(targetIP string)
	DeleteDeviceWithID(ID string)
	AddNewServiceName(serviceName string) error
	RemoveServiceName(serviceName string) error
	ResetServiceName()
	AddDeviceInfo(deviceID string, virtualAddr string, privateAddr string)
	GetOrchestrationInfo() (platform string, executionType string, serviceList []string, err error)
	SetRestResource()
	MNEDCClosedCallback()
	NotifyMNEDCBroadcastServer() error
	MNEDCReconciledCallback()
	StartMNEDCClient(string, string)
	StartMNEDCServer(string)
	client.Setter
	cipher.Setter
}

Discovery is the interface implementedy by all discovery functions

func GetInstance

func GetInstance() Discovery

GetInstance returns discovery instaance

type DiscoveryImpl

type DiscoveryImpl struct {
	client.HasClient
	cipher.HasCipher
}

DiscoveryImpl Structure

func (*DiscoveryImpl) AddDeviceInfo

func (d *DiscoveryImpl) AddDeviceInfo(deviceID string, virtualAddr string, privateAddr string)

AddDeviceInfo takes public and private IP from relay and requests for orchestration info from this device

func (*DiscoveryImpl) AddNewServiceName

func (d *DiscoveryImpl) AddNewServiceName(serviceName string) error

AddNewServiceName sets text field of mdns message with service application name

func (DiscoveryImpl) DeleteDeviceWithID

func (d DiscoveryImpl) DeleteDeviceWithID(ID string)

DeleteDeviceWithID delete device using deviceID

func (DiscoveryImpl) DeleteDeviceWithIP

func (DiscoveryImpl) DeleteDeviceWithIP(targetIP string)

DeleteDeviceWithIP deletes device info using deviceIP

func (DiscoveryImpl) GetOrchestrationInfo

func (DiscoveryImpl) GetOrchestrationInfo() (platform string, executionType string, serviceList []string, err error)

GetOrchestrationInfo returns the orchestration info of the device

func (*DiscoveryImpl) MNEDCClosedCallback

func (d *DiscoveryImpl) MNEDCClosedCallback()

MNEDCClosedCallback handles discovery behaviour when MNEDC connection is closed

func (*DiscoveryImpl) MNEDCReconciledCallback

func (d *DiscoveryImpl) MNEDCReconciledCallback()

MNEDCReconciledCallback handles discovery behaviour when MNEDC connection is closed

func (*DiscoveryImpl) NotifyMNEDCBroadcastServer

func (d *DiscoveryImpl) NotifyMNEDCBroadcastServer() error

NotifyMNEDCBroadcastServer registers to MNEDC

func (*DiscoveryImpl) RemoveServiceName

func (d *DiscoveryImpl) RemoveServiceName(serviceName string) error

RemoveServiceName removes text field of mdns message with service application name

func (*DiscoveryImpl) ResetServiceName

func (d *DiscoveryImpl) ResetServiceName()

ResetServiceName resets text field of mdns message

func (*DiscoveryImpl) SetRestResource

func (d *DiscoveryImpl) SetRestResource()

SetRestResource sets clienter

func (DiscoveryImpl) StartDiscovery

func (DiscoveryImpl) StartDiscovery(UUIDpath string, platform string, executionType string) (err error)

StartDiscovery starts server for network registration and do orchestration discovery activity

func (*DiscoveryImpl) StartMNEDCClient

func (d *DiscoveryImpl) StartMNEDCClient(deviceIDFilePath, mnedcServerConfig string)

StartMNEDCClient Starts MNEDC client

func (*DiscoveryImpl) StartMNEDCServer

func (d *DiscoveryImpl) StartMNEDCServer(deviceIDFilePath string)

StartMNEDCServer Starts MNEDC server

func (DiscoveryImpl) StopDiscovery

func (DiscoveryImpl) StopDiscovery()

StopDiscovery shutdowns server Todo : Set Normal Termination Function For Each Platform / Execution Type

type ExportDeviceMap

type ExportDeviceMap map[string]OrchestrationInformation

ExportDeviceMap gives device info map for discoverymgr user

type OrchestrationInformation

type OrchestrationInformation struct {
	Platform      string `json:"Platform"`
	ExecutionType string `json:"ExecutionType"`

	// List of IP and Services
	IPv4 []string `json:"IPv4"`
	// IPv6       []string   `json:"IPv6"`
	ServiceList []string `json:"ServiceList"`
}

OrchestrationInformation is the struct to handle orchestration

Directories

Path Synopsis
client/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
connectionutil/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
server/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
tunmgr/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package wrapper serves wrapper functions of zeroconf for orchestration
Package wrapper serves wrapper functions of zeroconf for orchestration
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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