web_runtime

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultWebRenderer = WebRenderer_WEB_RENDERER_ELECTRON

DefaultWebRenderer is the default web renderer for native applications.

View Source
const HostServerID = "web-runtime"

HostServerID is the server ID used for bldr /b/ http calls.

View Source
const SRPCWebRuntimeHostServiceID = "web.runtime.WebRuntimeHost"
View Source
const SRPCWebRuntimeServiceID = "web.runtime.WebRuntime"
View Source
const WebRendererEnvVar = "BLDR_WEB_RENDERER"

WebRendererEnvVar is the environment variable for selecting the web renderer.

Variables

View Source
var (
	WebRuntimeClientType_name = map[int32]string{
		0: "WebRuntimeClientType_UNKNOWN",
		1: "WebRuntimeClientType_WEB_DOCUMENT",
		2: "WebRuntimeClientType_SERVICE_WORKER",
		3: "WebRuntimeClientType_WEB_WORKER",
	}
	WebRuntimeClientType_value = map[string]int32{
		"WebRuntimeClientType_UNKNOWN":        0,
		"WebRuntimeClientType_WEB_DOCUMENT":   1,
		"WebRuntimeClientType_SERVICE_WORKER": 2,
		"WebRuntimeClientType_WEB_WORKER":     3,
	}
)

Enum value maps for WebRuntimeClientType.

View Source
var (
	WebRenderer_name = map[int32]string{
		0: "WEB_RENDERER_DEFAULT",
		1: "WEB_RENDERER_ELECTRON",
		2: "WEB_RENDERER_SAUCER",
	}
	WebRenderer_value = map[string]int32{
		"WEB_RENDERER_DEFAULT":  0,
		"WEB_RENDERER_ELECTRON": 1,
		"WEB_RENDERER_SAUCER":   2,
	}
)

Enum value maps for WebRenderer.

View Source
var ErrEmptyWebRuntimeID = errors.New("web runtime id cannot be empty")

ErrEmptyWebRuntimeID is returned if the web runtime ID was empty.

Functions

func NewSRPCWebRuntimeHandler

func NewSRPCWebRuntimeHandler(impl SRPCWebRuntimeServer, serviceID string) srpc.Handler

NewSRPCWebRuntimeHandler constructs a new RPC handler. serviceID: if empty, uses default: web.runtime.WebRuntime

func NewSRPCWebRuntimeHostHandler

func NewSRPCWebRuntimeHostHandler(impl SRPCWebRuntimeHostServer, serviceID string) srpc.Handler

NewSRPCWebRuntimeHostHandler constructs a new RPC handler. serviceID: if empty, uses default: web.runtime.WebRuntimeHost

func SRPCRegisterWebRuntime

func SRPCRegisterWebRuntime(mux srpc.Mux, impl SRPCWebRuntimeServer) error

SRPCRegisterWebRuntime registers the implementation with the mux. Uses the default serviceID: web.runtime.WebRuntime

func SRPCRegisterWebRuntimeHost

func SRPCRegisterWebRuntimeHost(mux srpc.Mux, impl SRPCWebRuntimeHostServer) error

SRPCRegisterWebRuntimeHost registers the implementation with the mux. Uses the default serviceID: web.runtime.WebRuntimeHost

func ValidateRuntimeId

func ValidateRuntimeId(id string) error

ValidateRuntimeId validates a runtime identifier.

Types

type CreateWebDocumentRequest

type CreateWebDocumentRequest struct {

	// id is the identifier for the new WebDocument.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

CreateWebDocumentRequest is a request to create a new web view.

func (*CreateWebDocumentRequest) CloneMessageVT

func (*CreateWebDocumentRequest) CloneVT

func (*CreateWebDocumentRequest) EqualMessageVT

func (this *CreateWebDocumentRequest) EqualMessageVT(thatMsg any) bool

func (*CreateWebDocumentRequest) EqualVT

func (*CreateWebDocumentRequest) GetId

func (x *CreateWebDocumentRequest) GetId() string

func (*CreateWebDocumentRequest) MarshalJSON

func (x *CreateWebDocumentRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CreateWebDocumentRequest to JSON.

func (*CreateWebDocumentRequest) MarshalProtoJSON

func (x *CreateWebDocumentRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CreateWebDocumentRequest message to JSON.

func (*CreateWebDocumentRequest) MarshalProtoText

func (x *CreateWebDocumentRequest) MarshalProtoText() string

func (*CreateWebDocumentRequest) MarshalToSizedBufferVT

func (m *CreateWebDocumentRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CreateWebDocumentRequest) MarshalToVT

func (m *CreateWebDocumentRequest) MarshalToVT(dAtA []byte) (int, error)

func (*CreateWebDocumentRequest) MarshalVT

func (m *CreateWebDocumentRequest) MarshalVT() (dAtA []byte, err error)

func (*CreateWebDocumentRequest) ProtoMessage

func (*CreateWebDocumentRequest) ProtoMessage()

func (*CreateWebDocumentRequest) Reset

func (x *CreateWebDocumentRequest) Reset()

func (*CreateWebDocumentRequest) SizeVT

func (m *CreateWebDocumentRequest) SizeVT() (n int)

func (*CreateWebDocumentRequest) String

func (x *CreateWebDocumentRequest) String() string

func (*CreateWebDocumentRequest) UnmarshalJSON

func (x *CreateWebDocumentRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CreateWebDocumentRequest from JSON.

func (*CreateWebDocumentRequest) UnmarshalProtoJSON

func (x *CreateWebDocumentRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CreateWebDocumentRequest message from JSON.

func (*CreateWebDocumentRequest) UnmarshalVT

func (m *CreateWebDocumentRequest) UnmarshalVT(dAtA []byte) error

type CreateWebDocumentResponse

type CreateWebDocumentResponse struct {

	// Created indicates the WebDocument was created.
	// If this is not set, assumes we cannot create WebDocuments.
	Created bool `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"`
	// contains filtered or unexported fields
}

CreateWebDocumentResponse is the response to the CreateWebDocument request.

func (*CreateWebDocumentResponse) CloneMessageVT

func (*CreateWebDocumentResponse) CloneVT

func (*CreateWebDocumentResponse) EqualMessageVT

func (this *CreateWebDocumentResponse) EqualMessageVT(thatMsg any) bool

func (*CreateWebDocumentResponse) EqualVT

func (*CreateWebDocumentResponse) GetCreated

func (x *CreateWebDocumentResponse) GetCreated() bool

func (*CreateWebDocumentResponse) MarshalJSON

func (x *CreateWebDocumentResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CreateWebDocumentResponse to JSON.

func (*CreateWebDocumentResponse) MarshalProtoJSON

func (x *CreateWebDocumentResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CreateWebDocumentResponse message to JSON.

func (*CreateWebDocumentResponse) MarshalProtoText

func (x *CreateWebDocumentResponse) MarshalProtoText() string

func (*CreateWebDocumentResponse) MarshalToSizedBufferVT

func (m *CreateWebDocumentResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CreateWebDocumentResponse) MarshalToVT

func (m *CreateWebDocumentResponse) MarshalToVT(dAtA []byte) (int, error)

func (*CreateWebDocumentResponse) MarshalVT

func (m *CreateWebDocumentResponse) MarshalVT() (dAtA []byte, err error)

func (*CreateWebDocumentResponse) ProtoMessage

func (*CreateWebDocumentResponse) ProtoMessage()

func (*CreateWebDocumentResponse) Reset

func (x *CreateWebDocumentResponse) Reset()

func (*CreateWebDocumentResponse) SizeVT

func (m *CreateWebDocumentResponse) SizeVT() (n int)

func (*CreateWebDocumentResponse) String

func (x *CreateWebDocumentResponse) String() string

func (*CreateWebDocumentResponse) UnmarshalJSON

func (x *CreateWebDocumentResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CreateWebDocumentResponse from JSON.

func (*CreateWebDocumentResponse) UnmarshalProtoJSON

func (x *CreateWebDocumentResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CreateWebDocumentResponse message from JSON.

func (*CreateWebDocumentResponse) UnmarshalVT

func (m *CreateWebDocumentResponse) UnmarshalVT(dAtA []byte) error

type LookupWebRuntime

type LookupWebRuntime interface {
	// Directive indicates LookupWebRuntime is a directive.
	directive.Directive

	// LookupWebRuntimeID is the web runtime ID to lookup.
	// Cannot be empty.
	LookupWebRuntimeID() string
}

LookupWebRuntime is a directive to lookup a WebRuntime.

func NewLookupWebRuntime

func NewLookupWebRuntime(webRuntimeID string) LookupWebRuntime

NewLookupWebRuntime constructs a new LookupWebRuntime directive.

type LookupWebRuntimeValue

type LookupWebRuntimeValue = WebRuntime

LookupWebRuntimeValue is the result of LookupWebRuntime.

func ExLookupWebRuntime

func ExLookupWebRuntime(
	ctx context.Context,
	b bus.Bus,
	returnIfIdle bool,
	webRuntimeID string,
) (LookupWebRuntimeValue, directive.Instance, directive.Reference, error)

ExLookupWebRuntime looks up a web view by id.

type Remote

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

Remote is a remote instance of a WebRuntime.

Communicates with the frontend using bldr/document.ts

func NewRemote

func NewRemote(
	le *logrus.Entry,
	b bus.Bus,
	handler WebRuntimeHandler,
	runtimeID string,
	rpcClient srpc.Client,
	execListener func(ctx context.Context, r *Remote) error,
) (*Remote, error)

NewRemote constructs a new browser runtime.

id should be the runtime identifier specified at startup by the js loader. initWebDocument should be a handle to the WebDocument which created the Remote.

func (*Remote) AcceptServiceWorkerRpcStreams

func (r *Remote) AcceptServiceWorkerRpcStreams(ctx context.Context, mc srpc.MuxedConn) error

AcceptServiceWorkerRpcStreams accepts streams from a muxed connection and handles RpcStream protocol, routing them to the ServiceWorkerHost mux. This is used for the saucer fetch connection where C++ FetchClient sends RpcStream-protocol requests directly to ServiceWorkerHost/Fetch.

func (*Remote) ConnectDesktopRuntimeResourceClient added in v0.51.2

func (r *Remote) ConnectDesktopRuntimeResourceClient(ctx context.Context) (*resource_client.Client, error)

ConnectDesktopRuntimeResourceClient connects to the Electron-main desktop resource tree.

func (*Remote) CreateWebDocument

func (r *Remote) CreateWebDocument(ctx context.Context, webDocumentID string) (bool, error)

CreateWebDocument creates a new web document.

Returns created, error: returns false for created if already exists. Returns false, nil if WebDocument cannot be created.

func (*Remote) Execute

func (r *Remote) Execute(rctx context.Context) error

Execute executes the runtime. Returns any errors, nil if Execute is not required.

func (*Remote) GetBus

func (r *Remote) GetBus() bus.Bus

GetBus returns the root controller bus to use in this process.

func (*Remote) GetLogger

func (r *Remote) GetLogger() *logrus.Entry

GetLogger returns the root log entry.

func (*Remote) GetRpcServer

func (r *Remote) GetRpcServer() *srpc.Server

GetRpcServer returns the RPC server.

func (*Remote) GetServiceWorkerHost

func (r *Remote) GetServiceWorkerHost(ctx context.Context, componentID string, _ func()) (srpc.Invoker, func(), error)

GetServiceWorkerHost returns the Invoker serving requests for the ServiceWorker.

func (*Remote) GetWebDocument

func (r *Remote) GetWebDocument(ctx context.Context, webDocumentID string, wait bool) (web_document.WebDocument, error)

GetWebDocument waits for the remote to be ready & returns the given WebDocument. If wait is set, waits for the web document ID to exist. Otherwise, returns nil, nil if not found.

func (*Remote) GetWebDocumentHost

func (r *Remote) GetWebDocumentHost(ctx context.Context, webDocumentID string, _ func()) (srpc.Invoker, func(), error)

GetWebDocumentHost returns the Mux serving requests for the given WebDocument.

Waits for the given web view ID to be available, or ctx to be canceled.

func (*Remote) GetWebDocumentOpenStream

func (r *Remote) GetWebDocumentOpenStream(webDocumentID string) srpc.OpenStreamFunc

GetWebDocumentOpenStream returns a OpenStreamFunc for the given WebDocument ID.

note: when opening the stream, waits for the given web document to exist.

func (*Remote) GetWebDocuments

func (r *Remote) GetWebDocuments(ctx context.Context) (map[string]web_document.WebDocument, error)

GetWebDocuments returns the current snapshot of active WebDocuments.

func (*Remote) GetWebRuntimeStatusCtr

func (r *Remote) GetWebRuntimeStatusCtr() *ccontainer.CContainer[*WebRuntimeStatus]

GetWebRuntimeStatusCtr contains a full snapshot of the web runtime status.

func (*Remote) GetWebWorkerHost

func (r *Remote) GetWebWorkerHost(ctx context.Context, webWorkerID string, _ func()) (srpc.Invoker, func(), error)

GetWebWorkerHost returns the Mux serving requests for the given WebWorker.

Waits for the given web worker ID to be available, or ctx to be canceled.

func (*Remote) GetWebWorkerOpenStream

func (r *Remote) GetWebWorkerOpenStream(webWorkerID string) srpc.OpenStreamFunc

GetWebWorkerOpenStream returns a OpenStreamFunc for the given WebWorker ID.

note: when opening the stream, waits for the given web worker to exist.

func (*Remote) RemoveWebDocument

func (r *Remote) RemoveWebDocument(ctx context.Context, webDocumentID string) (removed bool, err error)

RemoveWebDocument removes a web document by ID. note: this is called by webDocument.Remove. returns nil if not found

func (*Remote) WaitFirstWebDocument

func (r *Remote) WaitFirstWebDocument(ctx context.Context) (web_document.WebDocument, error)

WaitFirstWebDocument waits for at least one WebDocument to exist.

func (*Remote) WaitReady

func (r *Remote) WaitReady(ctx context.Context) error

WaitReady waits for the state to be ready.

func (*Remote) WebDocumentOpenStream

func (r *Remote) WebDocumentOpenStream(
	ctx context.Context,
	msgHandler srpc.PacketDataHandler,
	closeHandler srpc.CloseHandler,
	webDocumentID string,
) (srpc.PacketWriter, error)

WebDocumentOpenStream opens a stream with the given WebDocument ID.

note: when opening the stream, waits for the given web document to exist.

func (*Remote) WebWorkerOpenStream

func (r *Remote) WebWorkerOpenStream(
	ctx context.Context,
	msgHandler srpc.PacketDataHandler,
	closeHandler srpc.CloseHandler,
	webWorkerID string,
) (srpc.PacketWriter, error)

WebWorkerOpenStream opens a stream with the given WebWorker ID.

note: when opening the stream, waits for the given web worker to exist.

type RemoteWebDocument

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

RemoteWebDocument implements the Document page APIs for the runtime.

func NewRemoteWebDocument

func NewRemoteWebDocument(ctx context.Context, r *Remote, id string, permanent bool) (*RemoteWebDocument, error)

NewRemoteWebDocument constructs a new remote WebDocument handle.

if permanent, this web document is the primary and cannot be closed

func (*RemoteWebDocument) Close

func (w *RemoteWebDocument) Close()

Close closes the RemoteWebDocument.

func (*RemoteWebDocument) Execute

func (w *RemoteWebDocument) Execute()

Execute is the goroutine to execute the controller.

func (*RemoteWebDocument) GetWebDocumentUuid

func (w *RemoteWebDocument) GetWebDocumentUuid() string

GetWebDocumentUuid returns the web document identifier.

func (*RemoteWebDocument) OpenRpcStream

func (w *RemoteWebDocument) OpenRpcStream(
	ctx context.Context,
	msgHandler srpc.PacketDataHandler,
	closeHandler srpc.CloseHandler,
) (srpc.PacketWriter, error)

OpenRpcStream opens an RPC stream to the WebDocument.

type RemoveWebDocumentRequest

type RemoveWebDocumentRequest struct {

	// Id is the identifier for the WebDocument.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

RemoveWebDocumentRequest is a request to remove a WebDocument.

func (*RemoveWebDocumentRequest) CloneMessageVT

func (*RemoveWebDocumentRequest) CloneVT

func (*RemoveWebDocumentRequest) EqualMessageVT

func (this *RemoveWebDocumentRequest) EqualMessageVT(thatMsg any) bool

func (*RemoveWebDocumentRequest) EqualVT

func (*RemoveWebDocumentRequest) GetId

func (x *RemoveWebDocumentRequest) GetId() string

func (*RemoveWebDocumentRequest) MarshalJSON

func (x *RemoveWebDocumentRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the RemoveWebDocumentRequest to JSON.

func (*RemoveWebDocumentRequest) MarshalProtoJSON

func (x *RemoveWebDocumentRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the RemoveWebDocumentRequest message to JSON.

func (*RemoveWebDocumentRequest) MarshalProtoText

func (x *RemoveWebDocumentRequest) MarshalProtoText() string

func (*RemoveWebDocumentRequest) MarshalToSizedBufferVT

func (m *RemoveWebDocumentRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*RemoveWebDocumentRequest) MarshalToVT

func (m *RemoveWebDocumentRequest) MarshalToVT(dAtA []byte) (int, error)

func (*RemoveWebDocumentRequest) MarshalVT

func (m *RemoveWebDocumentRequest) MarshalVT() (dAtA []byte, err error)

func (*RemoveWebDocumentRequest) ProtoMessage

func (*RemoveWebDocumentRequest) ProtoMessage()

func (*RemoveWebDocumentRequest) Reset

func (x *RemoveWebDocumentRequest) Reset()

func (*RemoveWebDocumentRequest) SizeVT

func (m *RemoveWebDocumentRequest) SizeVT() (n int)

func (*RemoveWebDocumentRequest) String

func (x *RemoveWebDocumentRequest) String() string

func (*RemoveWebDocumentRequest) UnmarshalJSON

func (x *RemoveWebDocumentRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the RemoveWebDocumentRequest from JSON.

func (*RemoveWebDocumentRequest) UnmarshalProtoJSON

func (x *RemoveWebDocumentRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the RemoveWebDocumentRequest message from JSON.

func (*RemoveWebDocumentRequest) UnmarshalVT

func (m *RemoveWebDocumentRequest) UnmarshalVT(dAtA []byte) error

type RemoveWebDocumentResponse

type RemoveWebDocumentResponse struct {

	// Removed indicates the WebDocument was removed.
	// If this is not set, the document did not exist.
	Removed bool `protobuf:"varint,1,opt,name=removed,proto3" json:"removed,omitempty"`
	// contains filtered or unexported fields
}

RemoveWebDocumentResponse is the response to the RemoveWebDocument request.

func (*RemoveWebDocumentResponse) CloneMessageVT

func (*RemoveWebDocumentResponse) CloneVT

func (*RemoveWebDocumentResponse) EqualMessageVT

func (this *RemoveWebDocumentResponse) EqualMessageVT(thatMsg any) bool

func (*RemoveWebDocumentResponse) EqualVT

func (*RemoveWebDocumentResponse) GetRemoved

func (x *RemoveWebDocumentResponse) GetRemoved() bool

func (*RemoveWebDocumentResponse) MarshalJSON

func (x *RemoveWebDocumentResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the RemoveWebDocumentResponse to JSON.

func (*RemoveWebDocumentResponse) MarshalProtoJSON

func (x *RemoveWebDocumentResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the RemoveWebDocumentResponse message to JSON.

func (*RemoveWebDocumentResponse) MarshalProtoText

func (x *RemoveWebDocumentResponse) MarshalProtoText() string

func (*RemoveWebDocumentResponse) MarshalToSizedBufferVT

func (m *RemoveWebDocumentResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*RemoveWebDocumentResponse) MarshalToVT

func (m *RemoveWebDocumentResponse) MarshalToVT(dAtA []byte) (int, error)

func (*RemoveWebDocumentResponse) MarshalVT

func (m *RemoveWebDocumentResponse) MarshalVT() (dAtA []byte, err error)

func (*RemoveWebDocumentResponse) ProtoMessage

func (*RemoveWebDocumentResponse) ProtoMessage()

func (*RemoveWebDocumentResponse) Reset

func (x *RemoveWebDocumentResponse) Reset()

func (*RemoveWebDocumentResponse) SizeVT

func (m *RemoveWebDocumentResponse) SizeVT() (n int)

func (*RemoveWebDocumentResponse) String

func (x *RemoveWebDocumentResponse) String() string

func (*RemoveWebDocumentResponse) UnmarshalJSON

func (x *RemoveWebDocumentResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the RemoveWebDocumentResponse from JSON.

func (*RemoveWebDocumentResponse) UnmarshalProtoJSON

func (x *RemoveWebDocumentResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the RemoveWebDocumentResponse message from JSON.

func (*RemoveWebDocumentResponse) UnmarshalVT

func (m *RemoveWebDocumentResponse) UnmarshalVT(dAtA []byte) error

type RequestRuntimeQuitRequest added in v0.51.2

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

RequestRuntimeQuitRequest requests a clean host runtime quit.

func (*RequestRuntimeQuitRequest) CloneMessageVT added in v0.51.2

func (*RequestRuntimeQuitRequest) CloneVT added in v0.51.2

func (*RequestRuntimeQuitRequest) EqualMessageVT added in v0.51.2

func (this *RequestRuntimeQuitRequest) EqualMessageVT(thatMsg any) bool

func (*RequestRuntimeQuitRequest) EqualVT added in v0.51.2

func (*RequestRuntimeQuitRequest) MarshalJSON added in v0.51.2

func (x *RequestRuntimeQuitRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the RequestRuntimeQuitRequest to JSON.

func (*RequestRuntimeQuitRequest) MarshalProtoJSON added in v0.51.2

func (x *RequestRuntimeQuitRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the RequestRuntimeQuitRequest message to JSON.

func (*RequestRuntimeQuitRequest) MarshalProtoText added in v0.51.2

func (x *RequestRuntimeQuitRequest) MarshalProtoText() string

func (*RequestRuntimeQuitRequest) MarshalToSizedBufferVT added in v0.51.2

func (m *RequestRuntimeQuitRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*RequestRuntimeQuitRequest) MarshalToVT added in v0.51.2

func (m *RequestRuntimeQuitRequest) MarshalToVT(dAtA []byte) (int, error)

func (*RequestRuntimeQuitRequest) MarshalVT added in v0.51.2

func (m *RequestRuntimeQuitRequest) MarshalVT() (dAtA []byte, err error)

func (*RequestRuntimeQuitRequest) ProtoMessage added in v0.51.2

func (*RequestRuntimeQuitRequest) ProtoMessage()

func (*RequestRuntimeQuitRequest) Reset added in v0.51.2

func (x *RequestRuntimeQuitRequest) Reset()

func (*RequestRuntimeQuitRequest) SizeVT added in v0.51.2

func (m *RequestRuntimeQuitRequest) SizeVT() (n int)

func (*RequestRuntimeQuitRequest) String added in v0.51.2

func (x *RequestRuntimeQuitRequest) String() string

func (*RequestRuntimeQuitRequest) UnmarshalJSON added in v0.51.2

func (x *RequestRuntimeQuitRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the RequestRuntimeQuitRequest from JSON.

func (*RequestRuntimeQuitRequest) UnmarshalProtoJSON added in v0.51.2

func (x *RequestRuntimeQuitRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the RequestRuntimeQuitRequest message from JSON.

func (*RequestRuntimeQuitRequest) UnmarshalVT added in v0.51.2

func (m *RequestRuntimeQuitRequest) UnmarshalVT(dAtA []byte) error

type RequestRuntimeQuitResponse added in v0.51.2

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

RequestRuntimeQuitResponse is the response to RequestRuntimeQuit.

func (*RequestRuntimeQuitResponse) CloneMessageVT added in v0.51.2

func (*RequestRuntimeQuitResponse) CloneVT added in v0.51.2

func (*RequestRuntimeQuitResponse) EqualMessageVT added in v0.51.2

func (this *RequestRuntimeQuitResponse) EqualMessageVT(thatMsg any) bool

func (*RequestRuntimeQuitResponse) EqualVT added in v0.51.2

func (*RequestRuntimeQuitResponse) MarshalJSON added in v0.51.2

func (x *RequestRuntimeQuitResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the RequestRuntimeQuitResponse to JSON.

func (*RequestRuntimeQuitResponse) MarshalProtoJSON added in v0.51.2

func (x *RequestRuntimeQuitResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the RequestRuntimeQuitResponse message to JSON.

func (*RequestRuntimeQuitResponse) MarshalProtoText added in v0.51.2

func (x *RequestRuntimeQuitResponse) MarshalProtoText() string

func (*RequestRuntimeQuitResponse) MarshalToSizedBufferVT added in v0.51.2

func (m *RequestRuntimeQuitResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*RequestRuntimeQuitResponse) MarshalToVT added in v0.51.2

func (m *RequestRuntimeQuitResponse) MarshalToVT(dAtA []byte) (int, error)

func (*RequestRuntimeQuitResponse) MarshalVT added in v0.51.2

func (m *RequestRuntimeQuitResponse) MarshalVT() (dAtA []byte, err error)

func (*RequestRuntimeQuitResponse) ProtoMessage added in v0.51.2

func (*RequestRuntimeQuitResponse) ProtoMessage()

func (*RequestRuntimeQuitResponse) Reset added in v0.51.2

func (x *RequestRuntimeQuitResponse) Reset()

func (*RequestRuntimeQuitResponse) SizeVT added in v0.51.2

func (m *RequestRuntimeQuitResponse) SizeVT() (n int)

func (*RequestRuntimeQuitResponse) String added in v0.51.2

func (x *RequestRuntimeQuitResponse) String() string

func (*RequestRuntimeQuitResponse) UnmarshalJSON added in v0.51.2

func (x *RequestRuntimeQuitResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the RequestRuntimeQuitResponse from JSON.

func (*RequestRuntimeQuitResponse) UnmarshalProtoJSON added in v0.51.2

func (x *RequestRuntimeQuitResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the RequestRuntimeQuitResponse message from JSON.

func (*RequestRuntimeQuitResponse) UnmarshalVT added in v0.51.2

func (m *RequestRuntimeQuitResponse) UnmarshalVT(dAtA []byte) error

type SRPCWebRuntimeClient

type SRPCWebRuntimeClient interface {
	// SRPCClient returns the underlying SRPC client.
	SRPCClient() srpc.Client

	// WatchWebRuntimeStatus returns an initial snapshot of documents followed by updates.
	WatchWebRuntimeStatus(ctx context.Context, in *WatchWebRuntimeStatusRequest) (SRPCWebRuntime_WatchWebRuntimeStatusClient, error)
	// CreateWebDocument requests to create a new WebDocument.
	// Returns created: false if unable to create WebDocuments.
	// This usually creates a new Tab or Window.
	CreateWebDocument(ctx context.Context, in *CreateWebDocumentRequest) (*CreateWebDocumentResponse, error)
	// RemoveWebDocument requests to delete a WebDocument.
	// Returns created: false if unable to create WebDocuments.
	// This usually creates a new Tab or Window.
	RemoveWebDocument(ctx context.Context, in *RemoveWebDocumentRequest) (*RemoveWebDocumentResponse, error)
	// WebDocumentRpc opens a stream for a RPC call to a WebDocument.
	// Exposes the WebDocument service.
	// Id is the webDocumentId.
	WebDocumentRpc(ctx context.Context) (SRPCWebRuntime_WebDocumentRpcClient, error)
	// WebWorkerRpc opens a stream for a RPC call to a WebWorker.
	// Contacts the WebWorker via. the associated WebRuntimeClient.
	// The WebWorker must have registered with the runtime for this to work.
	// Note: this is on WebRuntime and not WebDocument for performance reasons (fewer context transfers).
	// Id is the webWorkerId.
	WebWorkerRpc(ctx context.Context) (SRPCWebRuntime_WebWorkerRpcClient, error)
}

func NewSRPCWebRuntimeClient

func NewSRPCWebRuntimeClient(cc srpc.Client) SRPCWebRuntimeClient

func NewSRPCWebRuntimeClientWithServiceID

func NewSRPCWebRuntimeClientWithServiceID(cc srpc.Client, serviceID string) SRPCWebRuntimeClient

type SRPCWebRuntimeHandler

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

func (SRPCWebRuntimeHandler) GetMethodIDs

func (SRPCWebRuntimeHandler) GetMethodIDs() []string

func (*SRPCWebRuntimeHandler) GetServiceID

func (d *SRPCWebRuntimeHandler) GetServiceID() string

func (*SRPCWebRuntimeHandler) InvokeMethod

func (d *SRPCWebRuntimeHandler) InvokeMethod(
	serviceID, methodID string,
	strm srpc.Stream,
) (bool, error)

func (SRPCWebRuntimeHandler) InvokeMethod_CreateWebDocument

func (SRPCWebRuntimeHandler) InvokeMethod_CreateWebDocument(impl SRPCWebRuntimeServer, strm srpc.Stream) error

func (SRPCWebRuntimeHandler) InvokeMethod_RemoveWebDocument

func (SRPCWebRuntimeHandler) InvokeMethod_RemoveWebDocument(impl SRPCWebRuntimeServer, strm srpc.Stream) error

func (SRPCWebRuntimeHandler) InvokeMethod_WatchWebRuntimeStatus

func (SRPCWebRuntimeHandler) InvokeMethod_WatchWebRuntimeStatus(impl SRPCWebRuntimeServer, strm srpc.Stream) error

func (SRPCWebRuntimeHandler) InvokeMethod_WebDocumentRpc

func (SRPCWebRuntimeHandler) InvokeMethod_WebDocumentRpc(impl SRPCWebRuntimeServer, strm srpc.Stream) error

func (SRPCWebRuntimeHandler) InvokeMethod_WebWorkerRpc

func (SRPCWebRuntimeHandler) InvokeMethod_WebWorkerRpc(impl SRPCWebRuntimeServer, strm srpc.Stream) error

type SRPCWebRuntimeHostClient

type SRPCWebRuntimeHostClient interface {
	// SRPCClient returns the underlying SRPC client.
	SRPCClient() srpc.Client

	// RequestRuntimeQuit asks the host runtime to perform a user-initiated quit.
	RequestRuntimeQuit(ctx context.Context, in *RequestRuntimeQuitRequest) (*RequestRuntimeQuitResponse, error)
	// WebDocumentRpc opens a stream for a RPC call to a WebDocument.
	// Exposes the WebDocumentHost service.
	// Id is the webDocumentId.
	WebDocumentRpc(ctx context.Context) (SRPCWebRuntimeHost_WebDocumentRpcClient, error)
	// ServiceWorkerRpc opens a stream for a RPC call from the ServiceWorker.
	// Exposes the ServiceWorkerHost service.
	// Id is the service worker id.
	ServiceWorkerRpc(ctx context.Context) (SRPCWebRuntimeHost_ServiceWorkerRpcClient, error)
	// WebWorkerRpc opens a stream for a RPC call from a WebWorker.
	// Exposes the WebWorkerHost service.
	// Id is the webWorkerId.
	WebWorkerRpc(ctx context.Context) (SRPCWebRuntimeHost_WebWorkerRpcClient, error)
}

func NewSRPCWebRuntimeHostClient

func NewSRPCWebRuntimeHostClient(cc srpc.Client) SRPCWebRuntimeHostClient

func NewSRPCWebRuntimeHostClientWithServiceID

func NewSRPCWebRuntimeHostClientWithServiceID(cc srpc.Client, serviceID string) SRPCWebRuntimeHostClient

type SRPCWebRuntimeHostHandler

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

func (SRPCWebRuntimeHostHandler) GetMethodIDs

func (SRPCWebRuntimeHostHandler) GetMethodIDs() []string

func (*SRPCWebRuntimeHostHandler) GetServiceID

func (d *SRPCWebRuntimeHostHandler) GetServiceID() string

func (*SRPCWebRuntimeHostHandler) InvokeMethod

func (d *SRPCWebRuntimeHostHandler) InvokeMethod(
	serviceID, methodID string,
	strm srpc.Stream,
) (bool, error)

func (SRPCWebRuntimeHostHandler) InvokeMethod_RequestRuntimeQuit added in v0.51.2

func (SRPCWebRuntimeHostHandler) InvokeMethod_RequestRuntimeQuit(impl SRPCWebRuntimeHostServer, strm srpc.Stream) error

func (SRPCWebRuntimeHostHandler) InvokeMethod_ServiceWorkerRpc

func (SRPCWebRuntimeHostHandler) InvokeMethod_ServiceWorkerRpc(impl SRPCWebRuntimeHostServer, strm srpc.Stream) error

func (SRPCWebRuntimeHostHandler) InvokeMethod_WebDocumentRpc

func (SRPCWebRuntimeHostHandler) InvokeMethod_WebDocumentRpc(impl SRPCWebRuntimeHostServer, strm srpc.Stream) error

func (SRPCWebRuntimeHostHandler) InvokeMethod_WebWorkerRpc

func (SRPCWebRuntimeHostHandler) InvokeMethod_WebWorkerRpc(impl SRPCWebRuntimeHostServer, strm srpc.Stream) error

type SRPCWebRuntimeHostServer

type SRPCWebRuntimeHostServer interface {
	// RequestRuntimeQuit asks the host runtime to perform a user-initiated quit.
	RequestRuntimeQuit(context.Context, *RequestRuntimeQuitRequest) (*RequestRuntimeQuitResponse, error)
	// WebDocumentRpc opens a stream for a RPC call to a WebDocument.
	// Exposes the WebDocumentHost service.
	// Id is the webDocumentId.
	WebDocumentRpc(SRPCWebRuntimeHost_WebDocumentRpcStream) error
	// ServiceWorkerRpc opens a stream for a RPC call from the ServiceWorker.
	// Exposes the ServiceWorkerHost service.
	// Id is the service worker id.
	ServiceWorkerRpc(SRPCWebRuntimeHost_ServiceWorkerRpcStream) error
	// WebWorkerRpc opens a stream for a RPC call from a WebWorker.
	// Exposes the WebWorkerHost service.
	// Id is the webWorkerId.
	WebWorkerRpc(SRPCWebRuntimeHost_WebWorkerRpcStream) error
}

type SRPCWebRuntimeHost_RequestRuntimeQuitStream added in v0.51.2

type SRPCWebRuntimeHost_RequestRuntimeQuitStream interface {
	srpc.Stream
}

type SRPCWebRuntimeHost_ServiceWorkerRpcClient

type SRPCWebRuntimeHost_ServiceWorkerRpcClient interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntimeHost_ServiceWorkerRpcStream

type SRPCWebRuntimeHost_ServiceWorkerRpcStream interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	SendAndClose(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntimeHost_WebDocumentRpcClient

type SRPCWebRuntimeHost_WebDocumentRpcClient interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntimeHost_WebDocumentRpcStream

type SRPCWebRuntimeHost_WebDocumentRpcStream interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	SendAndClose(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntimeHost_WebWorkerRpcClient

type SRPCWebRuntimeHost_WebWorkerRpcClient interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntimeHost_WebWorkerRpcStream

type SRPCWebRuntimeHost_WebWorkerRpcStream interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	SendAndClose(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntimeServer

type SRPCWebRuntimeServer interface {
	// WatchWebRuntimeStatus returns an initial snapshot of documents followed by updates.
	WatchWebRuntimeStatus(*WatchWebRuntimeStatusRequest, SRPCWebRuntime_WatchWebRuntimeStatusStream) error
	// CreateWebDocument requests to create a new WebDocument.
	// Returns created: false if unable to create WebDocuments.
	// This usually creates a new Tab or Window.
	CreateWebDocument(context.Context, *CreateWebDocumentRequest) (*CreateWebDocumentResponse, error)
	// RemoveWebDocument requests to delete a WebDocument.
	// Returns created: false if unable to create WebDocuments.
	// This usually creates a new Tab or Window.
	RemoveWebDocument(context.Context, *RemoveWebDocumentRequest) (*RemoveWebDocumentResponse, error)
	// WebDocumentRpc opens a stream for a RPC call to a WebDocument.
	// Exposes the WebDocument service.
	// Id is the webDocumentId.
	WebDocumentRpc(SRPCWebRuntime_WebDocumentRpcStream) error
	// WebWorkerRpc opens a stream for a RPC call to a WebWorker.
	// Contacts the WebWorker via. the associated WebRuntimeClient.
	// The WebWorker must have registered with the runtime for this to work.
	// Note: this is on WebRuntime and not WebDocument for performance reasons (fewer context transfers).
	// Id is the webWorkerId.
	WebWorkerRpc(SRPCWebRuntime_WebWorkerRpcStream) error
}

type SRPCWebRuntime_CreateWebDocumentStream

type SRPCWebRuntime_CreateWebDocumentStream interface {
	srpc.Stream
}

type SRPCWebRuntime_RemoveWebDocumentStream

type SRPCWebRuntime_RemoveWebDocumentStream interface {
	srpc.Stream
}

type SRPCWebRuntime_WatchWebRuntimeStatusClient

type SRPCWebRuntime_WatchWebRuntimeStatusClient interface {
	srpc.Stream
	Recv() (*WebRuntimeStatus, error)
	RecvTo(*WebRuntimeStatus) error
}

type SRPCWebRuntime_WatchWebRuntimeStatusStream

type SRPCWebRuntime_WatchWebRuntimeStatusStream interface {
	srpc.Stream
	Send(*WebRuntimeStatus) error
	SendAndClose(*WebRuntimeStatus) error
}

type SRPCWebRuntime_WebDocumentRpcClient

type SRPCWebRuntime_WebDocumentRpcClient interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntime_WebDocumentRpcStream

type SRPCWebRuntime_WebDocumentRpcStream interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	SendAndClose(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntime_WebWorkerRpcClient

type SRPCWebRuntime_WebWorkerRpcClient interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCWebRuntime_WebWorkerRpcStream

type SRPCWebRuntime_WebWorkerRpcStream interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	SendAndClose(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type WatchWebRuntimeStatusRequest

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

WatchWebRuntimeStatusRequest is the body of the WatchWebRuntimeStatus request.

func NewWatchWebRuntimeStatusRequest

func NewWatchWebRuntimeStatusRequest() *WatchWebRuntimeStatusRequest

NewWatchWebRuntimeStatusRequest constructs a new message to watch for WebRuntime status changes.

func (*WatchWebRuntimeStatusRequest) CloneMessageVT

func (*WatchWebRuntimeStatusRequest) CloneVT

func (*WatchWebRuntimeStatusRequest) EqualMessageVT

func (this *WatchWebRuntimeStatusRequest) EqualMessageVT(thatMsg any) bool

func (*WatchWebRuntimeStatusRequest) EqualVT

func (*WatchWebRuntimeStatusRequest) MarshalJSON

func (x *WatchWebRuntimeStatusRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the WatchWebRuntimeStatusRequest to JSON.

func (*WatchWebRuntimeStatusRequest) MarshalProtoJSON

func (x *WatchWebRuntimeStatusRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the WatchWebRuntimeStatusRequest message to JSON.

func (*WatchWebRuntimeStatusRequest) MarshalProtoText

func (x *WatchWebRuntimeStatusRequest) MarshalProtoText() string

func (*WatchWebRuntimeStatusRequest) MarshalToSizedBufferVT

func (m *WatchWebRuntimeStatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WatchWebRuntimeStatusRequest) MarshalToVT

func (m *WatchWebRuntimeStatusRequest) MarshalToVT(dAtA []byte) (int, error)

func (*WatchWebRuntimeStatusRequest) MarshalVT

func (m *WatchWebRuntimeStatusRequest) MarshalVT() (dAtA []byte, err error)

func (*WatchWebRuntimeStatusRequest) ProtoMessage

func (*WatchWebRuntimeStatusRequest) ProtoMessage()

func (*WatchWebRuntimeStatusRequest) Reset

func (x *WatchWebRuntimeStatusRequest) Reset()

func (*WatchWebRuntimeStatusRequest) SizeVT

func (m *WatchWebRuntimeStatusRequest) SizeVT() (n int)

func (*WatchWebRuntimeStatusRequest) String

func (*WatchWebRuntimeStatusRequest) UnmarshalJSON

func (x *WatchWebRuntimeStatusRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the WatchWebRuntimeStatusRequest from JSON.

func (*WatchWebRuntimeStatusRequest) UnmarshalProtoJSON

func (x *WatchWebRuntimeStatusRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the WatchWebRuntimeStatusRequest message from JSON.

func (*WatchWebRuntimeStatusRequest) UnmarshalVT

func (m *WatchWebRuntimeStatusRequest) UnmarshalVT(dAtA []byte) error

type WebDocumentStatus

type WebDocumentStatus struct {

	// Id is the unique identifier for the WebDocument.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Deleted indicates the document was just removed.
	// If set, all below fields are ignored.
	Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
	// Permanent indicates that this document cannot be closed.
	Permanent bool `protobuf:"varint,3,opt,name=permanent,proto3" json:"permanent,omitempty"`
	// contains filtered or unexported fields
}

WebDocumentStatus contains status for a WebDocument.

func (*WebDocumentStatus) CloneMessageVT

func (m *WebDocumentStatus) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*WebDocumentStatus) CloneVT

func (m *WebDocumentStatus) CloneVT() *WebDocumentStatus

func (*WebDocumentStatus) EqualMessageVT

func (this *WebDocumentStatus) EqualMessageVT(thatMsg any) bool

func (*WebDocumentStatus) EqualVT

func (this *WebDocumentStatus) EqualVT(that *WebDocumentStatus) bool

func (*WebDocumentStatus) GetDeleted

func (x *WebDocumentStatus) GetDeleted() bool

func (*WebDocumentStatus) GetId

func (x *WebDocumentStatus) GetId() string

func (*WebDocumentStatus) GetPermanent

func (x *WebDocumentStatus) GetPermanent() bool

func (*WebDocumentStatus) MarshalJSON

func (x *WebDocumentStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the WebDocumentStatus to JSON.

func (*WebDocumentStatus) MarshalProtoJSON

func (x *WebDocumentStatus) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the WebDocumentStatus message to JSON.

func (*WebDocumentStatus) MarshalProtoText

func (x *WebDocumentStatus) MarshalProtoText() string

func (*WebDocumentStatus) MarshalToSizedBufferVT

func (m *WebDocumentStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WebDocumentStatus) MarshalToVT

func (m *WebDocumentStatus) MarshalToVT(dAtA []byte) (int, error)

func (*WebDocumentStatus) MarshalVT

func (m *WebDocumentStatus) MarshalVT() (dAtA []byte, err error)

func (*WebDocumentStatus) ProtoMessage

func (*WebDocumentStatus) ProtoMessage()

func (*WebDocumentStatus) Reset

func (x *WebDocumentStatus) Reset()

func (*WebDocumentStatus) SizeVT

func (m *WebDocumentStatus) SizeVT() (n int)

func (*WebDocumentStatus) String

func (x *WebDocumentStatus) String() string

func (*WebDocumentStatus) UnmarshalJSON

func (x *WebDocumentStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the WebDocumentStatus from JSON.

func (*WebDocumentStatus) UnmarshalProtoJSON

func (x *WebDocumentStatus) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the WebDocumentStatus message from JSON.

func (*WebDocumentStatus) UnmarshalVT

func (m *WebDocumentStatus) UnmarshalVT(dAtA []byte) error

type WebRenderer

type WebRenderer int32

WebRenderer is the type of web renderer to use for native applications.

const (
	// WEB_RENDERER_DEFAULT uses the default renderer (currently electron).
	WebRenderer_WEB_RENDERER_DEFAULT WebRenderer = 0
	// WEB_RENDERER_ELECTRON uses Electron as the native runtime.
	WebRenderer_WEB_RENDERER_ELECTRON WebRenderer = 1
	// WEB_RENDERER_SAUCER uses Saucer (C++ webview) as the native runtime.
	WebRenderer_WEB_RENDERER_SAUCER WebRenderer = 2
)

func GetWebRendererFromEnv

func GetWebRendererFromEnv() WebRenderer

GetWebRendererFromEnv reads the web renderer from the environment variable. Returns WEB_RENDERER_DEFAULT if not set or empty.

func ParseWebRenderer

func ParseWebRenderer(s string) (WebRenderer, error)

ParseWebRenderer parses a web renderer string. Returns an error if the renderer is invalid.

func (WebRenderer) Enum

func (x WebRenderer) Enum() *WebRenderer

func (WebRenderer) MarshalJSON

func (x WebRenderer) MarshalJSON() ([]byte, error)

MarshalJSON marshals the WebRenderer to JSON.

func (WebRenderer) MarshalProtoJSON

func (x WebRenderer) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the WebRenderer to JSON.

func (WebRenderer) MarshalProtoText

func (x WebRenderer) MarshalProtoText() string

func (WebRenderer) MarshalText

func (x WebRenderer) MarshalText() ([]byte, error)

MarshalText marshals the WebRenderer to text.

func (WebRenderer) Resolve

func (r WebRenderer) Resolve() WebRenderer

Resolve resolves the web renderer, defaulting to electron if DEFAULT.

func (WebRenderer) String

func (x WebRenderer) String() string

func (*WebRenderer) UnmarshalJSON

func (x *WebRenderer) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the WebRenderer from JSON.

func (*WebRenderer) UnmarshalProtoJSON

func (x *WebRenderer) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the WebRenderer from JSON.

func (*WebRenderer) UnmarshalText

func (x *WebRenderer) UnmarshalText(b []byte) error

UnmarshalText unmarshals the WebRenderer from text.

func (WebRenderer) Validate

func (r WebRenderer) Validate() error

Validate validates the web renderer.

type WebRuntime

type WebRuntime interface {
	// Execute executes the runtime.
	// Returns any errors, nil if Execute is not required.
	// This should only be called by the web runtime controller!
	Execute(ctx context.Context) error

	// GetWebRuntimeStatusCtr contains a full snapshot of the web runtime status.
	GetWebRuntimeStatusCtr() *ccontainer.CContainer[*WebRuntimeStatus]

	// GetWebDocuments returns the current snapshot of active WebDocuments.
	GetWebDocuments(ctx context.Context) (map[string]web_document.WebDocument, error)

	// GetWebDocument waits for the remote to be ready & returns the given WebDocument.
	// If wait is set, waits for the web document ID to exist.
	// Otherwise, returns nil, nil if not found.
	GetWebDocument(ctx context.Context, webDocumentID string, wait bool) (web_document.WebDocument, error)

	// GetWebDocumentOpenStream returns a OpenStreamFunc for the given WebDocument ID.
	//
	// note: when opening the stream, waits for the given web document to exist.
	GetWebDocumentOpenStream(webDocumentID string) srpc.OpenStreamFunc

	// WaitReady waits for the state to be ready.
	WaitReady(ctx context.Context) error

	// WaitFirstWebDocument waits for at least one WebDocument to exist.
	WaitFirstWebDocument(ctx context.Context) (web_document.WebDocument, error)

	// ConnectDesktopRuntimeResourceClient connects to the desktop runtime resource tree.
	ConnectDesktopRuntimeResourceClient(ctx context.Context) (*resource_client.Client, error)

	// CreateWebDocument creates a new WebDocument.
	// This usually corresponds to creating a new Tab or Window.
	//
	// Returns false, nil if WebDocument cannot be created.
	CreateWebDocument(ctx context.Context, webViewID string) (bool, error)

	// GetWebWorkerOpenStream returns a OpenStreamFunc for the given WebWorker ID.
	//
	// note: when opening the stream, waits for the given web worker to exist.
	GetWebWorkerOpenStream(webWorkerID string) srpc.OpenStreamFunc
}

WebRuntime manages a list of WebDocument instances.

type WebRuntimeClientInit

type WebRuntimeClientInit struct {

	// RuntimeId is the shared identifier for the Go Runtime instance.
	//
	// must be set
	WebRuntimeId string `protobuf:"bytes,1,opt,name=web_runtime_id,json=webRuntimeId,proto3" json:"webRuntimeId,omitempty"`
	// ClientUuid is the identifier of the client.
	//
	// must be set
	ClientUuid string `protobuf:"bytes,2,opt,name=client_uuid,json=clientUuid,proto3" json:"clientUuid,omitempty"`
	// LogicalClientId is the stable routing identifier for the client.
	// If unset, the runtime falls back to client_uuid.
	LogicalClientId string `protobuf:"bytes,5,opt,name=logical_client_id,json=logicalClientId,proto3" json:"logicalClientId,omitempty"`
	// ClientType is the type of the client.
	ClientType WebRuntimeClientType `protobuf:"varint,3,opt,name=client_type,json=clientType,proto3" json:"clientType,omitempty"`
	// DisableWebLocks disables Web Locks API for disconnect detection.
	// Set when WebRuntime and WebDocument don't share the same lock namespace.
	DisableWebLocks bool `protobuf:"varint,4,opt,name=disable_web_locks,json=disableWebLocks,proto3" json:"disableWebLocks,omitempty"`
	// contains filtered or unexported fields
}

WebRuntimeClientInit is a message sent by a client of a WebRuntime.

func (*WebRuntimeClientInit) CloneMessageVT

func (*WebRuntimeClientInit) CloneVT

func (*WebRuntimeClientInit) EqualMessageVT

func (this *WebRuntimeClientInit) EqualMessageVT(thatMsg any) bool

func (*WebRuntimeClientInit) EqualVT

func (this *WebRuntimeClientInit) EqualVT(that *WebRuntimeClientInit) bool

func (*WebRuntimeClientInit) GetClientType

func (x *WebRuntimeClientInit) GetClientType() WebRuntimeClientType

func (*WebRuntimeClientInit) GetClientUuid

func (x *WebRuntimeClientInit) GetClientUuid() string

func (*WebRuntimeClientInit) GetDisableWebLocks

func (x *WebRuntimeClientInit) GetDisableWebLocks() bool

func (*WebRuntimeClientInit) GetLogicalClientId

func (x *WebRuntimeClientInit) GetLogicalClientId() string

func (*WebRuntimeClientInit) GetWebRuntimeId

func (x *WebRuntimeClientInit) GetWebRuntimeId() string

func (*WebRuntimeClientInit) MarshalJSON

func (x *WebRuntimeClientInit) MarshalJSON() ([]byte, error)

MarshalJSON marshals the WebRuntimeClientInit to JSON.

func (*WebRuntimeClientInit) MarshalProtoJSON

func (x *WebRuntimeClientInit) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the WebRuntimeClientInit message to JSON.

func (*WebRuntimeClientInit) MarshalProtoText

func (x *WebRuntimeClientInit) MarshalProtoText() string

func (*WebRuntimeClientInit) MarshalToSizedBufferVT

func (m *WebRuntimeClientInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WebRuntimeClientInit) MarshalToVT

func (m *WebRuntimeClientInit) MarshalToVT(dAtA []byte) (int, error)

func (*WebRuntimeClientInit) MarshalVT

func (m *WebRuntimeClientInit) MarshalVT() (dAtA []byte, err error)

func (*WebRuntimeClientInit) ProtoMessage

func (*WebRuntimeClientInit) ProtoMessage()

func (*WebRuntimeClientInit) Reset

func (x *WebRuntimeClientInit) Reset()

func (*WebRuntimeClientInit) SizeVT

func (m *WebRuntimeClientInit) SizeVT() (n int)

func (*WebRuntimeClientInit) String

func (x *WebRuntimeClientInit) String() string

func (*WebRuntimeClientInit) UnmarshalJSON

func (x *WebRuntimeClientInit) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the WebRuntimeClientInit from JSON.

func (*WebRuntimeClientInit) UnmarshalProtoJSON

func (x *WebRuntimeClientInit) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the WebRuntimeClientInit message from JSON.

func (*WebRuntimeClientInit) UnmarshalVT

func (m *WebRuntimeClientInit) UnmarshalVT(dAtA []byte) error

type WebRuntimeClientType

type WebRuntimeClientType int32

WebRuntimeClientType is the set of client types for a WebRuntime.

const (
	// WebRuntimeClientType_UNKNOWN is the unknown type.
	WebRuntimeClientType_WebRuntimeClientType_UNKNOWN WebRuntimeClientType = 0
	// WebRuntimeClientType_WEB_DOCUMENT is the WebDocument type.
	WebRuntimeClientType_WebRuntimeClientType_WEB_DOCUMENT WebRuntimeClientType = 1
	// WebRuntimeClientType_SERVICE_WORKER is the ServiceWorker type.
	WebRuntimeClientType_WebRuntimeClientType_SERVICE_WORKER WebRuntimeClientType = 2
	// WebRuntimeClientType_WEB_WORKER is the WebWorker type.
	WebRuntimeClientType_WebRuntimeClientType_WEB_WORKER WebRuntimeClientType = 3
)

func (WebRuntimeClientType) Enum

func (WebRuntimeClientType) MarshalJSON

func (x WebRuntimeClientType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the WebRuntimeClientType to JSON.

func (WebRuntimeClientType) MarshalProtoJSON

func (x WebRuntimeClientType) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the WebRuntimeClientType to JSON.

func (WebRuntimeClientType) MarshalProtoText

func (x WebRuntimeClientType) MarshalProtoText() string

func (WebRuntimeClientType) MarshalText

func (x WebRuntimeClientType) MarshalText() ([]byte, error)

MarshalText marshals the WebRuntimeClientType to text.

func (WebRuntimeClientType) String

func (x WebRuntimeClientType) String() string

func (*WebRuntimeClientType) UnmarshalJSON

func (x *WebRuntimeClientType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the WebRuntimeClientType from JSON.

func (*WebRuntimeClientType) UnmarshalProtoJSON

func (x *WebRuntimeClientType) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the WebRuntimeClientType from JSON.

func (*WebRuntimeClientType) UnmarshalText

func (x *WebRuntimeClientType) UnmarshalText(b []byte) error

UnmarshalText unmarshals the WebRuntimeClientType from text.

type WebRuntimeConfig

type WebRuntimeConfig interface {
	// Config indicates this is a controllerbus config object.
	config.Config
}

RuntimeConfig is a configuration for the runtime controller.

type WebRuntimeConstructor

type WebRuntimeConstructor func(
	ctx context.Context,
	le *logrus.Entry,
	handler WebRuntimeHandler,
) (WebRuntime, error)

WebRuntimeConstructor constructs a runtime with common parameters.

type WebRuntimeController

type WebRuntimeController interface {
	// Controller indicates this is a controller bus controller.
	controller.Controller
	// GetWebRuntime returns the controlled runtime, waiting for it to be non-nil.
	GetWebRuntime(ctx context.Context) (WebRuntime, error)
}

WebRuntimeController is a controller managing a WebRuntime.

type WebRuntimeHandler

type WebRuntimeHandler interface {
	// ServiceWorkerHandler includes the handlers for the Fetch requests.
	sw.ServiceWorkerHandler
	// HandleWebDocument handles an incoming WebDocument.
	HandleWebDocument(web_document.WebDocument)
}

WebRuntimeHandler is the handler (usually WebRuntimeController) for the document.

type WebRuntimeHostInit

type WebRuntimeHostInit struct {

	// WebRuntimeId is the identifier for the WebRuntime instance.
	//
	// must be set
	WebRuntimeId string `protobuf:"bytes,1,opt,name=web_runtime_id,json=webRuntimeId,proto3" json:"webRuntimeId,omitempty"`
	// contains filtered or unexported fields
}

WebRuntimeHostInit initializes the WebRuntimeHost.

only used in cases where the host runtime is initialized by the web runtime.

func (*WebRuntimeHostInit) CloneMessageVT

func (m *WebRuntimeHostInit) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*WebRuntimeHostInit) CloneVT

func (m *WebRuntimeHostInit) CloneVT() *WebRuntimeHostInit

func (*WebRuntimeHostInit) EqualMessageVT

func (this *WebRuntimeHostInit) EqualMessageVT(thatMsg any) bool

func (*WebRuntimeHostInit) EqualVT

func (this *WebRuntimeHostInit) EqualVT(that *WebRuntimeHostInit) bool

func (*WebRuntimeHostInit) GetWebRuntimeId

func (x *WebRuntimeHostInit) GetWebRuntimeId() string

func (*WebRuntimeHostInit) MarshalJSON

func (x *WebRuntimeHostInit) MarshalJSON() ([]byte, error)

MarshalJSON marshals the WebRuntimeHostInit to JSON.

func (*WebRuntimeHostInit) MarshalProtoJSON

func (x *WebRuntimeHostInit) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the WebRuntimeHostInit message to JSON.

func (*WebRuntimeHostInit) MarshalProtoText

func (x *WebRuntimeHostInit) MarshalProtoText() string

func (*WebRuntimeHostInit) MarshalToSizedBufferVT

func (m *WebRuntimeHostInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WebRuntimeHostInit) MarshalToVT

func (m *WebRuntimeHostInit) MarshalToVT(dAtA []byte) (int, error)

func (*WebRuntimeHostInit) MarshalVT

func (m *WebRuntimeHostInit) MarshalVT() (dAtA []byte, err error)

func (*WebRuntimeHostInit) ProtoMessage

func (*WebRuntimeHostInit) ProtoMessage()

func (*WebRuntimeHostInit) Reset

func (x *WebRuntimeHostInit) Reset()

func (*WebRuntimeHostInit) SizeVT

func (m *WebRuntimeHostInit) SizeVT() (n int)

func (*WebRuntimeHostInit) String

func (x *WebRuntimeHostInit) String() string

func (*WebRuntimeHostInit) UnmarshalJSON

func (x *WebRuntimeHostInit) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the WebRuntimeHostInit from JSON.

func (*WebRuntimeHostInit) UnmarshalProtoJSON

func (x *WebRuntimeHostInit) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the WebRuntimeHostInit message from JSON.

func (*WebRuntimeHostInit) UnmarshalVT

func (m *WebRuntimeHostInit) UnmarshalVT(dAtA []byte) error

type WebRuntimeStatus

type WebRuntimeStatus struct {

	// Snapshot indicates this is a full snapshot of the lists.
	Snapshot bool `protobuf:"varint,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
	// WebDocuments contains the list of web documents.
	WebDocuments []*WebDocumentStatus `protobuf:"bytes,2,rep,name=web_documents,json=webDocuments,proto3" json:"webDocuments,omitempty"`
	// Closed indicates the web runtime is closed.
	Closed bool `protobuf:"varint,3,opt,name=closed,proto3" json:"closed,omitempty"`
	// contains filtered or unexported fields
}

WebRuntimeStatus contains a snapshot of status for a Runtime instance.

func (*WebRuntimeStatus) CloneMessageVT

func (m *WebRuntimeStatus) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*WebRuntimeStatus) CloneVT

func (m *WebRuntimeStatus) CloneVT() *WebRuntimeStatus

func (*WebRuntimeStatus) EqualMessageVT

func (this *WebRuntimeStatus) EqualMessageVT(thatMsg any) bool

func (*WebRuntimeStatus) EqualVT

func (this *WebRuntimeStatus) EqualVT(that *WebRuntimeStatus) bool

func (*WebRuntimeStatus) GetClosed

func (x *WebRuntimeStatus) GetClosed() bool

func (*WebRuntimeStatus) GetSnapshot

func (x *WebRuntimeStatus) GetSnapshot() bool

func (*WebRuntimeStatus) GetWebDocuments

func (x *WebRuntimeStatus) GetWebDocuments() []*WebDocumentStatus

func (*WebRuntimeStatus) MarshalJSON

func (x *WebRuntimeStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the WebRuntimeStatus to JSON.

func (*WebRuntimeStatus) MarshalProtoJSON

func (x *WebRuntimeStatus) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the WebRuntimeStatus message to JSON.

func (*WebRuntimeStatus) MarshalProtoText

func (x *WebRuntimeStatus) MarshalProtoText() string

func (*WebRuntimeStatus) MarshalToSizedBufferVT

func (m *WebRuntimeStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WebRuntimeStatus) MarshalToVT

func (m *WebRuntimeStatus) MarshalToVT(dAtA []byte) (int, error)

func (*WebRuntimeStatus) MarshalVT

func (m *WebRuntimeStatus) MarshalVT() (dAtA []byte, err error)

func (*WebRuntimeStatus) ProtoMessage

func (*WebRuntimeStatus) ProtoMessage()

func (*WebRuntimeStatus) Reset

func (x *WebRuntimeStatus) Reset()

func (*WebRuntimeStatus) SizeVT

func (m *WebRuntimeStatus) SizeVT() (n int)

func (*WebRuntimeStatus) String

func (x *WebRuntimeStatus) String() string

func (*WebRuntimeStatus) UnmarshalJSON

func (x *WebRuntimeStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the WebRuntimeStatus from JSON.

func (*WebRuntimeStatus) UnmarshalProtoJSON

func (x *WebRuntimeStatus) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the WebRuntimeStatus message from JSON.

func (*WebRuntimeStatus) UnmarshalVT

func (m *WebRuntimeStatus) UnmarshalVT(dAtA []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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