ipc

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

GO render IPC通道

Index

Constants

View Source
const (
	InternalIPCGoExecuteGoEvent       = "GoEmitGo"
	InternalIPCGoExecuteJSEventReplay = "GoEmitGoReplay"
)

Variables

This section is empty.

Functions

func CheckEmitCallback

func CheckEmitCallback(id int32) *callback.Callback

CheckEmitCallback

IPC checks if the GO Emit callback function exists
returns the function and removes it

func CheckOnEvent

func CheckOnEvent(name string) *callback.Callback

CheckOnEvent

IPC checks if the event listening in GO exists
returns the function and removes it

func Emit

func Emit(name string, argument ...any)

Emit

Event that triggers listening
default to triggering the main process

func EmitAndCallback

func EmitAndCallback(name string, argument []any, fn any)

EmitAndCallback

Event that triggers listening
with callback function
default to the main process

func EmitTarget

func EmitTarget(name string, tag target.ITarget, argument ...any)

EmitTarget

Trigger an event for the specified target to listen to

func EmitTargetAndCallback

func EmitTargetAndCallback(name string, tag target.ITarget, argument []any, fn any)

EmitTargetAndCallback

Trigger an event with a callback function for the specified target to listen on

func On

func On(name string, fn any, options ...types.OnOptions)

On

IPC GO Listening for events

func RemoveOn

func RemoveOn(name string)

RemoveOn IPC GO Remove listening events

func SetProcessMessage

func SetProcessMessage(pm types.IProcessMessage)

SetProcessMessage

Set the process message object
without manually calling it

Types

type EmitContextCallback

type EmitContextCallback func(context context.IContext)

EmitContextCallback IPC context Callback Function

type IBrowserIPCChan

type IBrowserIPCChan interface {
	IPC() channel.IBrowserChannel
	AddCallback(callback func(channelId int64, argument argument.IList) bool)
}

func BrowserChan

func BrowserChan() IBrowserIPCChan

func CreateBrowserIPC

func CreateBrowserIPC() IBrowserIPCChan

CreateBrowserIPC

Main process IPC creation

type IRenderIPCChan

type IRenderIPCChan interface {
	IPC() channel.IRenderChannel
	SetRealityChannel(browserId int32, channelId int64)
	AddCallback(callback func(channelId int64, argumentList argument.IList) bool)
	BrowserId() int32
	ChannelId() int64
}

func CreateRenderIPC

func CreateRenderIPC(browserId int32, channelId int64) IRenderIPCChan

CreateRenderIPC Rendering process IPC creation

func RenderChan

func RenderChan() IRenderIPCChan

type SyncChan

type SyncChan struct {
	ResultSyncChan chan any //receive synchronization chan, default nil
	// contains filtered or unexported fields
}

SyncChan

IPC synchronous receiving data channel

func (*SyncChan) DelayWaiting

func (m *SyncChan) DelayWaiting()

DelayWaiting

Synchronous message, delay, default 5000 milliseconds

func (*SyncChan) SetDelayTime

func (m *SyncChan) SetDelayTime(delay time.Duration)

SetDelayTime

Set maximum delay time in milliseconds

func (*SyncChan) Stop

func (m *SyncChan) Stop()

Stop Immediate stop delay

Jump to

Keyboard shortcuts

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