wrapper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package wrapper serves wrapper functions of zeroconf for orchestration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	DeviceID          string
	TTL               uint32
	OrchestrationInfo OrchestrationInformation
}

Entity provides wrapper entity info

type OrchestrationInformation

type OrchestrationInformation struct {
	IPv4          []string
	Platform      string
	ExecutionType string
	ServiceList   []string
}

OrchestrationInformation provides orchestration info

type ZeroconfImpl

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

ZeroconfImpl struct

var ZeroconfIns *ZeroconfImpl

ZeroconfIns struct

func (ZeroconfImpl) Advertise

func (zc ZeroconfImpl) Advertise()

Advertise advertises local server to other servers

func (ZeroconfImpl) GetSubscriberChan

func (zc ZeroconfImpl) GetSubscriberChan() (chan *Entity, error)

GetSubscriberChan subscribers serviceEntry info of other devices

func (ZeroconfImpl) GetText

func (zc ZeroconfImpl) GetText() []string

GetText gets text field

func (*ZeroconfImpl) RegisterProxy

func (zc *ZeroconfImpl) RegisterProxy(instance, service, domain string,
	port int, host string, ips []string, text []string,
	ifaces []net.Interface) (Entity, error)

RegisterProxy is the wrapper of zeroconf.RegisterProxy

func (ZeroconfImpl) ResetServer

func (zc ZeroconfImpl) ResetServer(ips []net.IP)

ResetServer resets local server

func (ZeroconfImpl) SetText

func (zc ZeroconfImpl) SetText(txt []string)

SetText sets text field

func (ZeroconfImpl) Shutdown

func (zc ZeroconfImpl) Shutdown()

Shutdown shutdowns local server

type ZeroconfInterface

type ZeroconfInterface interface {
	RegisterProxy(string, string, string, int,
		string, []string, []string,
		[]net.Interface) (Entity, error)
	GetSubscriberChan() (chan *Entity, error)
	ResetServer([]net.IP)
	Advertise()
	SetText([]string)
	GetText() []string
	Shutdown()
}

ZeroconfInterface is the interface implemented by wrapped functions using zeroconf ToDo : How to deal w/ data conver function?

func GetZeroconfImpl

func GetZeroconfImpl() ZeroconfInterface

GetZeroconfImpl provides ZeroconfImpl instance which have zerconf server address

Directories

Path Synopsis
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