processes

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncGetProcessIdForTab

func FuncGetProcessIdForTab() (fn js.Func[func(tabId int32) js.Promise[js.Number[int32]]])

FuncGetProcessIdForTab returns the function "WEBEXT.processes.getProcessIdForTab".

func FuncGetProcessInfo

func FuncGetProcessInfo() (fn js.Func[func(processIds OneOf_Int32_ArrayInt32, includeMemory bool) js.Promise[js.Object]])

FuncGetProcessInfo returns the function "WEBEXT.processes.getProcessInfo".

func FuncHasOnCreated

func FuncHasOnCreated() (fn js.Func[func(callback js.Func[func(process *Process)]) bool])

FuncHasOnCreated returns the function "WEBEXT.processes.onCreated.hasListener".

func FuncHasOnExited

func FuncHasOnExited() (fn js.Func[func(callback js.Func[func(processId int32, exitType int32, exitCode int32)]) bool])

FuncHasOnExited returns the function "WEBEXT.processes.onExited.hasListener".

func FuncHasOnUnresponsive

func FuncHasOnUnresponsive() (fn js.Func[func(callback js.Func[func(process *Process)]) bool])

FuncHasOnUnresponsive returns the function "WEBEXT.processes.onUnresponsive.hasListener".

func FuncHasOnUpdated

func FuncHasOnUpdated() (fn js.Func[func(callback js.Func[func(processes js.Object)]) bool])

FuncHasOnUpdated returns the function "WEBEXT.processes.onUpdated.hasListener".

func FuncHasOnUpdatedWithMemory

func FuncHasOnUpdatedWithMemory() (fn js.Func[func(callback js.Func[func(processes js.Object)]) bool])

FuncHasOnUpdatedWithMemory returns the function "WEBEXT.processes.onUpdatedWithMemory.hasListener".

func FuncOffCreated

func FuncOffCreated() (fn js.Func[func(callback js.Func[func(process *Process)])])

FuncOffCreated returns the function "WEBEXT.processes.onCreated.removeListener".

func FuncOffExited

func FuncOffExited() (fn js.Func[func(callback js.Func[func(processId int32, exitType int32, exitCode int32)])])

FuncOffExited returns the function "WEBEXT.processes.onExited.removeListener".

func FuncOffUnresponsive

func FuncOffUnresponsive() (fn js.Func[func(callback js.Func[func(process *Process)])])

FuncOffUnresponsive returns the function "WEBEXT.processes.onUnresponsive.removeListener".

func FuncOffUpdated

func FuncOffUpdated() (fn js.Func[func(callback js.Func[func(processes js.Object)])])

FuncOffUpdated returns the function "WEBEXT.processes.onUpdated.removeListener".

func FuncOffUpdatedWithMemory

func FuncOffUpdatedWithMemory() (fn js.Func[func(callback js.Func[func(processes js.Object)])])

FuncOffUpdatedWithMemory returns the function "WEBEXT.processes.onUpdatedWithMemory.removeListener".

func FuncOnCreated

func FuncOnCreated() (fn js.Func[func(callback js.Func[func(process *Process)])])

FuncOnCreated returns the function "WEBEXT.processes.onCreated.addListener".

func FuncOnExited

func FuncOnExited() (fn js.Func[func(callback js.Func[func(processId int32, exitType int32, exitCode int32)])])

FuncOnExited returns the function "WEBEXT.processes.onExited.addListener".

func FuncOnUnresponsive

func FuncOnUnresponsive() (fn js.Func[func(callback js.Func[func(process *Process)])])

FuncOnUnresponsive returns the function "WEBEXT.processes.onUnresponsive.addListener".

func FuncOnUpdated

func FuncOnUpdated() (fn js.Func[func(callback js.Func[func(processes js.Object)])])

FuncOnUpdated returns the function "WEBEXT.processes.onUpdated.addListener".

func FuncOnUpdatedWithMemory

func FuncOnUpdatedWithMemory() (fn js.Func[func(callback js.Func[func(processes js.Object)])])

FuncOnUpdatedWithMemory returns the function "WEBEXT.processes.onUpdatedWithMemory.addListener".

func FuncTerminate

func FuncTerminate() (fn js.Func[func(processId int32) js.Promise[js.Boolean]])

FuncTerminate returns the function "WEBEXT.processes.terminate".

func GetProcessIdForTab

func GetProcessIdForTab(tabId int32) (ret js.Promise[js.Number[int32]])

GetProcessIdForTab calls the function "WEBEXT.processes.getProcessIdForTab" directly.

func GetProcessInfo

func GetProcessInfo(processIds OneOf_Int32_ArrayInt32, includeMemory bool) (ret js.Promise[js.Object])

GetProcessInfo calls the function "WEBEXT.processes.getProcessInfo" directly.

func HasFuncGetProcessIdForTab

func HasFuncGetProcessIdForTab() bool

HasFuncGetProcessIdForTab returns true if the function "WEBEXT.processes.getProcessIdForTab" exists.

func HasFuncGetProcessInfo

func HasFuncGetProcessInfo() bool

HasFuncGetProcessInfo returns true if the function "WEBEXT.processes.getProcessInfo" exists.

func HasFuncHasOnCreated

func HasFuncHasOnCreated() bool

HasFuncHasOnCreated returns true if the function "WEBEXT.processes.onCreated.hasListener" exists.

func HasFuncHasOnExited

func HasFuncHasOnExited() bool

HasFuncHasOnExited returns true if the function "WEBEXT.processes.onExited.hasListener" exists.

func HasFuncHasOnUnresponsive

func HasFuncHasOnUnresponsive() bool

HasFuncHasOnUnresponsive returns true if the function "WEBEXT.processes.onUnresponsive.hasListener" exists.

func HasFuncHasOnUpdated

func HasFuncHasOnUpdated() bool

HasFuncHasOnUpdated returns true if the function "WEBEXT.processes.onUpdated.hasListener" exists.

func HasFuncHasOnUpdatedWithMemory

func HasFuncHasOnUpdatedWithMemory() bool

HasFuncHasOnUpdatedWithMemory returns true if the function "WEBEXT.processes.onUpdatedWithMemory.hasListener" exists.

func HasFuncOffCreated

func HasFuncOffCreated() bool

HasFuncOffCreated returns true if the function "WEBEXT.processes.onCreated.removeListener" exists.

func HasFuncOffExited

func HasFuncOffExited() bool

HasFuncOffExited returns true if the function "WEBEXT.processes.onExited.removeListener" exists.

func HasFuncOffUnresponsive

func HasFuncOffUnresponsive() bool

HasFuncOffUnresponsive returns true if the function "WEBEXT.processes.onUnresponsive.removeListener" exists.

func HasFuncOffUpdated

func HasFuncOffUpdated() bool

HasFuncOffUpdated returns true if the function "WEBEXT.processes.onUpdated.removeListener" exists.

func HasFuncOffUpdatedWithMemory

func HasFuncOffUpdatedWithMemory() bool

HasFuncOffUpdatedWithMemory returns true if the function "WEBEXT.processes.onUpdatedWithMemory.removeListener" exists.

func HasFuncOnCreated

func HasFuncOnCreated() bool

HasFuncOnCreated returns true if the function "WEBEXT.processes.onCreated.addListener" exists.

func HasFuncOnExited

func HasFuncOnExited() bool

HasFuncOnExited returns true if the function "WEBEXT.processes.onExited.addListener" exists.

func HasFuncOnUnresponsive

func HasFuncOnUnresponsive() bool

HasFuncOnUnresponsive returns true if the function "WEBEXT.processes.onUnresponsive.addListener" exists.

func HasFuncOnUpdated

func HasFuncOnUpdated() bool

HasFuncOnUpdated returns true if the function "WEBEXT.processes.onUpdated.addListener" exists.

func HasFuncOnUpdatedWithMemory

func HasFuncOnUpdatedWithMemory() bool

HasFuncOnUpdatedWithMemory returns true if the function "WEBEXT.processes.onUpdatedWithMemory.addListener" exists.

func HasFuncTerminate

func HasFuncTerminate() bool

HasFuncTerminate returns true if the function "WEBEXT.processes.terminate" exists.

func HasOnCreated

func HasOnCreated(callback js.Func[func(process *Process)]) (ret bool)

HasOnCreated calls the function "WEBEXT.processes.onCreated.hasListener" directly.

func HasOnExited

func HasOnExited(callback js.Func[func(processId int32, exitType int32, exitCode int32)]) (ret bool)

HasOnExited calls the function "WEBEXT.processes.onExited.hasListener" directly.

func HasOnUnresponsive

func HasOnUnresponsive(callback js.Func[func(process *Process)]) (ret bool)

HasOnUnresponsive calls the function "WEBEXT.processes.onUnresponsive.hasListener" directly.

func HasOnUpdated

func HasOnUpdated(callback js.Func[func(processes js.Object)]) (ret bool)

HasOnUpdated calls the function "WEBEXT.processes.onUpdated.hasListener" directly.

func HasOnUpdatedWithMemory

func HasOnUpdatedWithMemory(callback js.Func[func(processes js.Object)]) (ret bool)

HasOnUpdatedWithMemory calls the function "WEBEXT.processes.onUpdatedWithMemory.hasListener" directly.

func OffCreated

func OffCreated(callback js.Func[func(process *Process)]) (ret js.Void)

OffCreated calls the function "WEBEXT.processes.onCreated.removeListener" directly.

func OffExited

func OffExited(callback js.Func[func(processId int32, exitType int32, exitCode int32)]) (ret js.Void)

OffExited calls the function "WEBEXT.processes.onExited.removeListener" directly.

func OffUnresponsive

func OffUnresponsive(callback js.Func[func(process *Process)]) (ret js.Void)

OffUnresponsive calls the function "WEBEXT.processes.onUnresponsive.removeListener" directly.

func OffUpdated

func OffUpdated(callback js.Func[func(processes js.Object)]) (ret js.Void)

OffUpdated calls the function "WEBEXT.processes.onUpdated.removeListener" directly.

func OffUpdatedWithMemory

func OffUpdatedWithMemory(callback js.Func[func(processes js.Object)]) (ret js.Void)

OffUpdatedWithMemory calls the function "WEBEXT.processes.onUpdatedWithMemory.removeListener" directly.

func OnCreated

func OnCreated(callback js.Func[func(process *Process)]) (ret js.Void)

OnCreated calls the function "WEBEXT.processes.onCreated.addListener" directly.

func OnExited

func OnExited(callback js.Func[func(processId int32, exitType int32, exitCode int32)]) (ret js.Void)

OnExited calls the function "WEBEXT.processes.onExited.addListener" directly.

func OnUnresponsive

func OnUnresponsive(callback js.Func[func(process *Process)]) (ret js.Void)

OnUnresponsive calls the function "WEBEXT.processes.onUnresponsive.addListener" directly.

func OnUpdated

func OnUpdated(callback js.Func[func(processes js.Object)]) (ret js.Void)

OnUpdated calls the function "WEBEXT.processes.onUpdated.addListener" directly.

func OnUpdatedWithMemory

func OnUpdatedWithMemory(callback js.Func[func(processes js.Object)]) (ret js.Void)

OnUpdatedWithMemory calls the function "WEBEXT.processes.onUpdatedWithMemory.addListener" directly.

func Terminate

func Terminate(processId int32) (ret js.Promise[js.Boolean])

Terminate calls the function "WEBEXT.processes.terminate" directly.

func TryGetProcessIdForTab

func TryGetProcessIdForTab(tabId int32) (ret js.Promise[js.Number[int32]], exception js.Any, ok bool)

TryGetProcessIdForTab calls the function "WEBEXT.processes.getProcessIdForTab" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryGetProcessInfo

func TryGetProcessInfo(processIds OneOf_Int32_ArrayInt32, includeMemory bool) (ret js.Promise[js.Object], exception js.Any, ok bool)

TryGetProcessInfo calls the function "WEBEXT.processes.getProcessInfo" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryHasOnCreated

func TryHasOnCreated(callback js.Func[func(process *Process)]) (ret bool, exception js.Any, ok bool)

TryHasOnCreated calls the function "WEBEXT.processes.onCreated.hasListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryHasOnExited

func TryHasOnExited(callback js.Func[func(processId int32, exitType int32, exitCode int32)]) (ret bool, exception js.Any, ok bool)

TryHasOnExited calls the function "WEBEXT.processes.onExited.hasListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryHasOnUnresponsive

func TryHasOnUnresponsive(callback js.Func[func(process *Process)]) (ret bool, exception js.Any, ok bool)

TryHasOnUnresponsive calls the function "WEBEXT.processes.onUnresponsive.hasListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryHasOnUpdated

func TryHasOnUpdated(callback js.Func[func(processes js.Object)]) (ret bool, exception js.Any, ok bool)

TryHasOnUpdated calls the function "WEBEXT.processes.onUpdated.hasListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryHasOnUpdatedWithMemory

func TryHasOnUpdatedWithMemory(callback js.Func[func(processes js.Object)]) (ret bool, exception js.Any, ok bool)

TryHasOnUpdatedWithMemory calls the function "WEBEXT.processes.onUpdatedWithMemory.hasListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOffCreated

func TryOffCreated(callback js.Func[func(process *Process)]) (ret js.Void, exception js.Any, ok bool)

TryOffCreated calls the function "WEBEXT.processes.onCreated.removeListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOffExited

func TryOffExited(callback js.Func[func(processId int32, exitType int32, exitCode int32)]) (ret js.Void, exception js.Any, ok bool)

TryOffExited calls the function "WEBEXT.processes.onExited.removeListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOffUnresponsive

func TryOffUnresponsive(callback js.Func[func(process *Process)]) (ret js.Void, exception js.Any, ok bool)

TryOffUnresponsive calls the function "WEBEXT.processes.onUnresponsive.removeListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOffUpdated

func TryOffUpdated(callback js.Func[func(processes js.Object)]) (ret js.Void, exception js.Any, ok bool)

TryOffUpdated calls the function "WEBEXT.processes.onUpdated.removeListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOffUpdatedWithMemory

func TryOffUpdatedWithMemory(callback js.Func[func(processes js.Object)]) (ret js.Void, exception js.Any, ok bool)

TryOffUpdatedWithMemory calls the function "WEBEXT.processes.onUpdatedWithMemory.removeListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOnCreated

func TryOnCreated(callback js.Func[func(process *Process)]) (ret js.Void, exception js.Any, ok bool)

TryOnCreated calls the function "WEBEXT.processes.onCreated.addListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOnExited

func TryOnExited(callback js.Func[func(processId int32, exitType int32, exitCode int32)]) (ret js.Void, exception js.Any, ok bool)

TryOnExited calls the function "WEBEXT.processes.onExited.addListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOnUnresponsive

func TryOnUnresponsive(callback js.Func[func(process *Process)]) (ret js.Void, exception js.Any, ok bool)

TryOnUnresponsive calls the function "WEBEXT.processes.onUnresponsive.addListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOnUpdated

func TryOnUpdated(callback js.Func[func(processes js.Object)]) (ret js.Void, exception js.Any, ok bool)

TryOnUpdated calls the function "WEBEXT.processes.onUpdated.addListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOnUpdatedWithMemory

func TryOnUpdatedWithMemory(callback js.Func[func(processes js.Object)]) (ret js.Void, exception js.Any, ok bool)

TryOnUpdatedWithMemory calls the function "WEBEXT.processes.onUpdatedWithMemory.addListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryTerminate

func TryTerminate(processId int32) (ret js.Promise[js.Boolean], exception js.Any, ok bool)

TryTerminate calls the function "WEBEXT.processes.terminate" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

Types

type Cache

type Cache struct {
	// Size is "Cache.size"
	//
	// Optional
	//
	// NOTE: FFI_USE_Size MUST be set to true to make this field effective.
	Size float64
	// LiveSize is "Cache.liveSize"
	//
	// Optional
	//
	// NOTE: FFI_USE_LiveSize MUST be set to true to make this field effective.
	LiveSize float64

	FFI_USE_Size     bool // for Size.
	FFI_USE_LiveSize bool // for LiveSize.

	FFI_USE bool
}

func (*Cache) FreeMembers

func (p *Cache) FreeMembers(recursive bool)

FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.

func (Cache) FromRef

func (p Cache) FromRef(ref js.Ref) Cache

FromRef calls UpdateFrom and returns a Cache with all fields set.

func (Cache) New

func (p Cache) New() js.Ref

New creates a new Cache in the application heap.

func (*Cache) Update

func (p *Cache) Update(ref js.Ref)

Update writes all fields of the p to the heap object referenced by ref.

func (*Cache) UpdateFrom

func (p *Cache) UpdateFrom(ref js.Ref)

UpdateFrom copies value of all fields of the heap object to p.

type GetProcessIdForTabCallback

type GetProcessIdForTabCallback[T any] struct {
	Fn  func(arg T, this js.Ref, processId int32) js.Ref
	Arg T
}

func (*GetProcessIdForTabCallback[T]) DispatchCallback

func (cb *GetProcessIdForTabCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*GetProcessIdForTabCallback[T]) Register

func (cb *GetProcessIdForTabCallback[T]) Register() js.Func[func(processId int32)]

type GetProcessIdForTabCallbackFunc

type GetProcessIdForTabCallbackFunc func(this js.Ref, processId int32) js.Ref

func (GetProcessIdForTabCallbackFunc) DispatchCallback

func (fn GetProcessIdForTabCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (GetProcessIdForTabCallbackFunc) Register

func (fn GetProcessIdForTabCallbackFunc) Register() js.Func[func(processId int32)]

type GetProcessInfoCallback

type GetProcessInfoCallback[T any] struct {
	Fn  func(arg T, this js.Ref, processes js.Object) js.Ref
	Arg T
}

func (*GetProcessInfoCallback[T]) DispatchCallback

func (cb *GetProcessInfoCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*GetProcessInfoCallback[T]) Register

func (cb *GetProcessInfoCallback[T]) Register() js.Func[func(processes js.Object)]

type GetProcessInfoCallbackFunc

type GetProcessInfoCallbackFunc func(this js.Ref, processes js.Object) js.Ref

func (GetProcessInfoCallbackFunc) DispatchCallback

func (fn GetProcessInfoCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (GetProcessInfoCallbackFunc) Register

func (fn GetProcessInfoCallbackFunc) Register() js.Func[func(processes js.Object)]

type OnCreatedEventCallback

type OnCreatedEventCallback[T any] struct {
	Fn  func(arg T, this js.Ref, process *Process) js.Ref
	Arg T
}

func (*OnCreatedEventCallback[T]) DispatchCallback

func (cb *OnCreatedEventCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*OnCreatedEventCallback[T]) Register

func (cb *OnCreatedEventCallback[T]) Register() js.Func[func(process *Process)]

type OnCreatedEventCallbackFunc

type OnCreatedEventCallbackFunc func(this js.Ref, process *Process) js.Ref

func (OnCreatedEventCallbackFunc) DispatchCallback

func (fn OnCreatedEventCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (OnCreatedEventCallbackFunc) Register

func (fn OnCreatedEventCallbackFunc) Register() js.Func[func(process *Process)]

type OnExitedEventCallback

type OnExitedEventCallback[T any] struct {
	Fn  func(arg T, this js.Ref, processId int32, exitType int32, exitCode int32) js.Ref
	Arg T
}

func (*OnExitedEventCallback[T]) DispatchCallback

func (cb *OnExitedEventCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*OnExitedEventCallback[T]) Register

func (cb *OnExitedEventCallback[T]) Register() js.Func[func(processId int32, exitType int32, exitCode int32)]

type OnExitedEventCallbackFunc

type OnExitedEventCallbackFunc func(this js.Ref, processId int32, exitType int32, exitCode int32) js.Ref

func (OnExitedEventCallbackFunc) DispatchCallback

func (fn OnExitedEventCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (OnExitedEventCallbackFunc) Register

func (fn OnExitedEventCallbackFunc) Register() js.Func[func(processId int32, exitType int32, exitCode int32)]

type OnUnresponsiveEventCallback

type OnUnresponsiveEventCallback[T any] struct {
	Fn  func(arg T, this js.Ref, process *Process) js.Ref
	Arg T
}

func (*OnUnresponsiveEventCallback[T]) DispatchCallback

func (cb *OnUnresponsiveEventCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*OnUnresponsiveEventCallback[T]) Register

func (cb *OnUnresponsiveEventCallback[T]) Register() js.Func[func(process *Process)]

type OnUnresponsiveEventCallbackFunc

type OnUnresponsiveEventCallbackFunc func(this js.Ref, process *Process) js.Ref

func (OnUnresponsiveEventCallbackFunc) DispatchCallback

func (fn OnUnresponsiveEventCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (OnUnresponsiveEventCallbackFunc) Register

func (fn OnUnresponsiveEventCallbackFunc) Register() js.Func[func(process *Process)]

type OnUpdatedEventCallback

type OnUpdatedEventCallback[T any] struct {
	Fn  func(arg T, this js.Ref, processes js.Object) js.Ref
	Arg T
}

func (*OnUpdatedEventCallback[T]) DispatchCallback

func (cb *OnUpdatedEventCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*OnUpdatedEventCallback[T]) Register

func (cb *OnUpdatedEventCallback[T]) Register() js.Func[func(processes js.Object)]

type OnUpdatedEventCallbackFunc

type OnUpdatedEventCallbackFunc func(this js.Ref, processes js.Object) js.Ref

func (OnUpdatedEventCallbackFunc) DispatchCallback

func (fn OnUpdatedEventCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (OnUpdatedEventCallbackFunc) Register

func (fn OnUpdatedEventCallbackFunc) Register() js.Func[func(processes js.Object)]

type OnUpdatedWithMemoryEventCallback

type OnUpdatedWithMemoryEventCallback[T any] struct {
	Fn  func(arg T, this js.Ref, processes js.Object) js.Ref
	Arg T
}

func (*OnUpdatedWithMemoryEventCallback[T]) DispatchCallback

func (cb *OnUpdatedWithMemoryEventCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*OnUpdatedWithMemoryEventCallback[T]) Register

func (cb *OnUpdatedWithMemoryEventCallback[T]) Register() js.Func[func(processes js.Object)]

type OnUpdatedWithMemoryEventCallbackFunc

type OnUpdatedWithMemoryEventCallbackFunc func(this js.Ref, processes js.Object) js.Ref

func (OnUpdatedWithMemoryEventCallbackFunc) DispatchCallback

func (fn OnUpdatedWithMemoryEventCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (OnUpdatedWithMemoryEventCallbackFunc) Register

func (fn OnUpdatedWithMemoryEventCallbackFunc) Register() js.Func[func(processes js.Object)]

type OneOf_Int32_ArrayInt32

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

func (OneOf_Int32_ArrayInt32) ArrayInt32

func (x OneOf_Int32_ArrayInt32) ArrayInt32() js.Array[int32]

func (OneOf_Int32_ArrayInt32) Free

func (x OneOf_Int32_ArrayInt32) Free()

func (OneOf_Int32_ArrayInt32) FromRef

func (OneOf_Int32_ArrayInt32) Int32

func (x OneOf_Int32_ArrayInt32) Int32() int32

func (OneOf_Int32_ArrayInt32) Ref

func (x OneOf_Int32_ArrayInt32) Ref() js.Ref

type Process

type Process struct {
	// Id is "Process.id"
	//
	// Optional
	//
	// NOTE: FFI_USE_Id MUST be set to true to make this field effective.
	Id int32
	// OsProcessId is "Process.osProcessId"
	//
	// Optional
	//
	// NOTE: FFI_USE_OsProcessId MUST be set to true to make this field effective.
	OsProcessId int32
	// Type is "Process.type"
	//
	// Optional
	Type ProcessType
	// Profile is "Process.profile"
	//
	// Optional
	Profile js.String
	// NaclDebugPort is "Process.naclDebugPort"
	//
	// Optional
	//
	// NOTE: FFI_USE_NaclDebugPort MUST be set to true to make this field effective.
	NaclDebugPort int32
	// Tasks is "Process.tasks"
	//
	// Optional
	Tasks js.Array[TaskInfo]
	// Cpu is "Process.cpu"
	//
	// Optional
	//
	// NOTE: FFI_USE_Cpu MUST be set to true to make this field effective.
	Cpu float64
	// Network is "Process.network"
	//
	// Optional
	//
	// NOTE: FFI_USE_Network MUST be set to true to make this field effective.
	Network float64
	// PrivateMemory is "Process.privateMemory"
	//
	// Optional
	//
	// NOTE: FFI_USE_PrivateMemory MUST be set to true to make this field effective.
	PrivateMemory float64
	// JsMemoryAllocated is "Process.jsMemoryAllocated"
	//
	// Optional
	//
	// NOTE: FFI_USE_JsMemoryAllocated MUST be set to true to make this field effective.
	JsMemoryAllocated float64
	// JsMemoryUsed is "Process.jsMemoryUsed"
	//
	// Optional
	//
	// NOTE: FFI_USE_JsMemoryUsed MUST be set to true to make this field effective.
	JsMemoryUsed float64
	// SqliteMemory is "Process.sqliteMemory"
	//
	// Optional
	//
	// NOTE: FFI_USE_SqliteMemory MUST be set to true to make this field effective.
	SqliteMemory float64
	// ImageCache is "Process.imageCache"
	//
	// Optional
	//
	// NOTE: ImageCache.FFI_USE MUST be set to true to get ImageCache used.
	ImageCache Cache
	// ScriptCache is "Process.scriptCache"
	//
	// Optional
	//
	// NOTE: ScriptCache.FFI_USE MUST be set to true to get ScriptCache used.
	ScriptCache Cache
	// CssCache is "Process.cssCache"
	//
	// Optional
	//
	// NOTE: CssCache.FFI_USE MUST be set to true to get CssCache used.
	CssCache Cache

	FFI_USE_Id                bool // for Id.
	FFI_USE_OsProcessId       bool // for OsProcessId.
	FFI_USE_NaclDebugPort     bool // for NaclDebugPort.
	FFI_USE_Cpu               bool // for Cpu.
	FFI_USE_Network           bool // for Network.
	FFI_USE_PrivateMemory     bool // for PrivateMemory.
	FFI_USE_JsMemoryAllocated bool // for JsMemoryAllocated.
	FFI_USE_JsMemoryUsed      bool // for JsMemoryUsed.
	FFI_USE_SqliteMemory      bool // for SqliteMemory.

	FFI_USE bool
}

func (*Process) FreeMembers

func (p *Process) FreeMembers(recursive bool)

FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.

func (Process) FromRef

func (p Process) FromRef(ref js.Ref) Process

FromRef calls UpdateFrom and returns a Process with all fields set.

func (Process) New

func (p Process) New() js.Ref

New creates a new Process in the application heap.

func (*Process) Update

func (p *Process) Update(ref js.Ref)

Update writes all fields of the p to the heap object referenced by ref.

func (*Process) UpdateFrom

func (p *Process) UpdateFrom(ref js.Ref)

UpdateFrom copies value of all fields of the heap object to p.

type ProcessType

type ProcessType uint32
const (
	ProcessType_BROWSER ProcessType
	ProcessType_RENDERER
	ProcessType_EXTENSION
	ProcessType_NOTIFICATION
	ProcessType_PLUGIN
	ProcessType_WORKER
	ProcessType_NACL
	ProcessType_SERVICE_WORKER
	ProcessType_UTILITY
	ProcessType_GPU
	ProcessType_OTHER
)

func (ProcessType) FromRef

func (ProcessType) FromRef(str js.Ref) ProcessType

func (ProcessType) String

func (x ProcessType) String() (string, bool)

type TaskInfo

type TaskInfo struct {
	// Title is "TaskInfo.title"
	//
	// Optional
	Title js.String
	// TabId is "TaskInfo.tabId"
	//
	// Optional
	//
	// NOTE: FFI_USE_TabId MUST be set to true to make this field effective.
	TabId int32

	FFI_USE_TabId bool // for TabId.

	FFI_USE bool
}

func (*TaskInfo) FreeMembers

func (p *TaskInfo) FreeMembers(recursive bool)

FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.

func (TaskInfo) FromRef

func (p TaskInfo) FromRef(ref js.Ref) TaskInfo

FromRef calls UpdateFrom and returns a TaskInfo with all fields set.

func (TaskInfo) New

func (p TaskInfo) New() js.Ref

New creates a new TaskInfo in the application heap.

func (*TaskInfo) Update

func (p *TaskInfo) Update(ref js.Ref)

Update writes all fields of the p to the heap object referenced by ref.

func (*TaskInfo) UpdateFrom

func (p *TaskInfo) UpdateFrom(ref js.Ref)

UpdateFrom copies value of all fields of the heap object to p.

type TerminateCallback

type TerminateCallback[T any] struct {
	Fn  func(arg T, this js.Ref, didTerminate bool) js.Ref
	Arg T
}

func (*TerminateCallback[T]) DispatchCallback

func (cb *TerminateCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*TerminateCallback[T]) Register

func (cb *TerminateCallback[T]) Register() js.Func[func(didTerminate bool)]

type TerminateCallbackFunc

type TerminateCallbackFunc func(this js.Ref, didTerminate bool) js.Ref

func (TerminateCallbackFunc) DispatchCallback

func (fn TerminateCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (TerminateCallbackFunc) Register

func (fn TerminateCallbackFunc) Register() js.Func[func(didTerminate bool)]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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