javaapi

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package javaapi provides Java interface for orchestration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptToByteAndPost

func EncryptToByteAndPost(data string, target string) int

EncryptToByteAndPost encryps json data to byte array

func GetPrivateIP

func GetPrivateIP() string

GetPrivateIP returns private IP of the device

func MNEDCConnectionClosed

func MNEDCConnectionClosed()

MNEDCConnectionClosed notifies discovery manager that MNEDC connection is closed

func MNEDCConnectionReEstablished

func MNEDCConnectionReEstablished()

MNEDCConnectionReEstablished notifies discovery manager that MNEDC connection is re-established

func OrchestrationInit

func OrchestrationInit(executeCallback ExecuteCallback, edgeDir string, isSecured bool) (errCode int)

OrchestrationInit runs orchestration service and discovers remote orchestration services

func OrchestrationSetHandler added in v1.1.0

func OrchestrationSetHandler(handler Handler)

OrchestrationSetHandler sets tls handler

func PrintLog

func PrintLog(cMsg string) (count int)

PrintLog provides logging interface

func RegisterToBroadcastServer

func RegisterToBroadcastServer() int

RegisterToBroadcastServer registers to the discovery server

Types

type ExecuteCallback

type ExecuteCallback interface {
	androidexecutor.ExecuteCallback
}

ExecuteCallback is required to launch application in java layer

type Handler added in v1.1.0

type Handler interface {
	tls.Handler
}

Handler interface

type ReqeustService

type ReqeustService struct {
	ServiceName      string
	SelfSelection    bool
	ServiceRequester string
	ServiceInfo      []RequestServiceInfo
}

ReqeustService structure

func (ReqeustService) GetExecutionCommand

func (r ReqeustService) GetExecutionCommand(execType string) string

GetExecutionCommand gets execution command for specific S/W platform

func (*ReqeustService) SetExecutionCommand

func (r *ReqeustService) SetExecutionCommand(execType string, command string)

SetExecutionCommand sets execution command for specific S/W platform

type RequestServiceInfo

type RequestServiceInfo struct {
	ExecutionType string
	ExeCmd        []string
}

RequestServiceInfo structure

type ResponseService

type ResponseService struct {
	Message          string
	ServiceName      string
	RemoteTargetInfo *TargetInfo
}

ResponseService structure

func OrchestrationRequestService

func OrchestrationRequestService(request *ReqeustService) *ResponseService

OrchestrationRequestService performs request from service applications which uses orchestration service

func (ResponseService) GetExecutedType

func (r ResponseService) GetExecutedType() string

GetExecutedType returns execution type ("native", "android", "container")

func (ResponseService) GetTarget

func (r ResponseService) GetTarget() string

GetTarget returns target

type TargetInfo

type TargetInfo struct {
	ExecutionType string
	Target        string
}

TargetInfo structure

Jump to

Keyboard shortcuts

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