Documentation
¶
Index ¶
- Constants
- Variables
- func NewSRPCWebRuntimeHandler(impl SRPCWebRuntimeServer, serviceID string) srpc.Handler
- func NewSRPCWebRuntimeHostHandler(impl SRPCWebRuntimeHostServer, serviceID string) srpc.Handler
- func SRPCRegisterWebRuntime(mux srpc.Mux, impl SRPCWebRuntimeServer) error
- func SRPCRegisterWebRuntimeHost(mux srpc.Mux, impl SRPCWebRuntimeHostServer) error
- func ValidateRuntimeId(id string) error
- type CreateWebDocumentRequest
- func (m *CreateWebDocumentRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *CreateWebDocumentRequest) CloneVT() *CreateWebDocumentRequest
- func (this *CreateWebDocumentRequest) EqualMessageVT(thatMsg any) bool
- func (this *CreateWebDocumentRequest) EqualVT(that *CreateWebDocumentRequest) bool
- func (x *CreateWebDocumentRequest) GetId() string
- func (x *CreateWebDocumentRequest) MarshalJSON() ([]byte, error)
- func (x *CreateWebDocumentRequest) MarshalProtoJSON(s *json.MarshalState)
- func (x *CreateWebDocumentRequest) MarshalProtoText() string
- func (m *CreateWebDocumentRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CreateWebDocumentRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *CreateWebDocumentRequest) MarshalVT() (dAtA []byte, err error)
- func (*CreateWebDocumentRequest) ProtoMessage()
- func (x *CreateWebDocumentRequest) Reset()
- func (m *CreateWebDocumentRequest) SizeVT() (n int)
- func (x *CreateWebDocumentRequest) String() string
- func (x *CreateWebDocumentRequest) UnmarshalJSON(b []byte) error
- func (x *CreateWebDocumentRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *CreateWebDocumentRequest) UnmarshalVT(dAtA []byte) error
- type CreateWebDocumentResponse
- func (m *CreateWebDocumentResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *CreateWebDocumentResponse) CloneVT() *CreateWebDocumentResponse
- func (this *CreateWebDocumentResponse) EqualMessageVT(thatMsg any) bool
- func (this *CreateWebDocumentResponse) EqualVT(that *CreateWebDocumentResponse) bool
- func (x *CreateWebDocumentResponse) GetCreated() bool
- func (x *CreateWebDocumentResponse) MarshalJSON() ([]byte, error)
- func (x *CreateWebDocumentResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *CreateWebDocumentResponse) MarshalProtoText() string
- func (m *CreateWebDocumentResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CreateWebDocumentResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *CreateWebDocumentResponse) MarshalVT() (dAtA []byte, err error)
- func (*CreateWebDocumentResponse) ProtoMessage()
- func (x *CreateWebDocumentResponse) Reset()
- func (m *CreateWebDocumentResponse) SizeVT() (n int)
- func (x *CreateWebDocumentResponse) String() string
- func (x *CreateWebDocumentResponse) UnmarshalJSON(b []byte) error
- func (x *CreateWebDocumentResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *CreateWebDocumentResponse) UnmarshalVT(dAtA []byte) error
- type LookupWebRuntime
- type LookupWebRuntimeValue
- type Remote
- func (r *Remote) AcceptServiceWorkerRpcStreams(ctx context.Context, mc srpc.MuxedConn) error
- func (r *Remote) CreateWebDocument(ctx context.Context, webDocumentID string) (bool, error)
- func (r *Remote) Execute(rctx context.Context) error
- func (r *Remote) GetBus() bus.Bus
- func (r *Remote) GetLogger() *logrus.Entry
- func (r *Remote) GetRpcServer() *srpc.Server
- func (r *Remote) GetServiceWorkerHost(ctx context.Context, componentID string, _ func()) (srpc.Invoker, func(), error)
- func (r *Remote) GetWebDocument(ctx context.Context, webDocumentID string, wait bool) (web_document.WebDocument, error)
- func (r *Remote) GetWebDocumentHost(ctx context.Context, webDocumentID string, _ func()) (srpc.Invoker, func(), error)
- func (r *Remote) GetWebDocumentOpenStream(webDocumentID string) srpc.OpenStreamFunc
- func (r *Remote) GetWebDocuments(ctx context.Context) (map[string]web_document.WebDocument, error)
- func (r *Remote) GetWebRuntimeStatusCtr() *ccontainer.CContainer[*WebRuntimeStatus]
- func (r *Remote) GetWebWorkerHost(ctx context.Context, webWorkerID string, _ func()) (srpc.Invoker, func(), error)
- func (r *Remote) GetWebWorkerOpenStream(webWorkerID string) srpc.OpenStreamFunc
- func (r *Remote) RemoveWebDocument(ctx context.Context, webDocumentID string) (removed bool, err error)
- func (r *Remote) WaitFirstWebDocument(ctx context.Context) (web_document.WebDocument, error)
- func (r *Remote) WaitReady(ctx context.Context) error
- func (r *Remote) WebDocumentOpenStream(ctx context.Context, msgHandler srpc.PacketDataHandler, ...) (srpc.PacketWriter, error)
- func (r *Remote) WebWorkerOpenStream(ctx context.Context, msgHandler srpc.PacketDataHandler, ...) (srpc.PacketWriter, error)
- type RemoteWebDocument
- type RemoveWebDocumentRequest
- func (m *RemoveWebDocumentRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *RemoveWebDocumentRequest) CloneVT() *RemoveWebDocumentRequest
- func (this *RemoveWebDocumentRequest) EqualMessageVT(thatMsg any) bool
- func (this *RemoveWebDocumentRequest) EqualVT(that *RemoveWebDocumentRequest) bool
- func (x *RemoveWebDocumentRequest) GetId() string
- func (x *RemoveWebDocumentRequest) MarshalJSON() ([]byte, error)
- func (x *RemoveWebDocumentRequest) MarshalProtoJSON(s *json.MarshalState)
- func (x *RemoveWebDocumentRequest) MarshalProtoText() string
- func (m *RemoveWebDocumentRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *RemoveWebDocumentRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *RemoveWebDocumentRequest) MarshalVT() (dAtA []byte, err error)
- func (*RemoveWebDocumentRequest) ProtoMessage()
- func (x *RemoveWebDocumentRequest) Reset()
- func (m *RemoveWebDocumentRequest) SizeVT() (n int)
- func (x *RemoveWebDocumentRequest) String() string
- func (x *RemoveWebDocumentRequest) UnmarshalJSON(b []byte) error
- func (x *RemoveWebDocumentRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *RemoveWebDocumentRequest) UnmarshalVT(dAtA []byte) error
- type RemoveWebDocumentResponse
- func (m *RemoveWebDocumentResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *RemoveWebDocumentResponse) CloneVT() *RemoveWebDocumentResponse
- func (this *RemoveWebDocumentResponse) EqualMessageVT(thatMsg any) bool
- func (this *RemoveWebDocumentResponse) EqualVT(that *RemoveWebDocumentResponse) bool
- func (x *RemoveWebDocumentResponse) GetRemoved() bool
- func (x *RemoveWebDocumentResponse) MarshalJSON() ([]byte, error)
- func (x *RemoveWebDocumentResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *RemoveWebDocumentResponse) MarshalProtoText() string
- func (m *RemoveWebDocumentResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *RemoveWebDocumentResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *RemoveWebDocumentResponse) MarshalVT() (dAtA []byte, err error)
- func (*RemoveWebDocumentResponse) ProtoMessage()
- func (x *RemoveWebDocumentResponse) Reset()
- func (m *RemoveWebDocumentResponse) SizeVT() (n int)
- func (x *RemoveWebDocumentResponse) String() string
- func (x *RemoveWebDocumentResponse) UnmarshalJSON(b []byte) error
- func (x *RemoveWebDocumentResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *RemoveWebDocumentResponse) UnmarshalVT(dAtA []byte) error
- type SRPCWebRuntimeClient
- type SRPCWebRuntimeHandler
- func (SRPCWebRuntimeHandler) GetMethodIDs() []string
- func (d *SRPCWebRuntimeHandler) GetServiceID() string
- func (d *SRPCWebRuntimeHandler) InvokeMethod(serviceID, methodID string, strm srpc.Stream) (bool, error)
- func (SRPCWebRuntimeHandler) InvokeMethod_CreateWebDocument(impl SRPCWebRuntimeServer, strm srpc.Stream) error
- func (SRPCWebRuntimeHandler) InvokeMethod_RemoveWebDocument(impl SRPCWebRuntimeServer, strm srpc.Stream) error
- func (SRPCWebRuntimeHandler) InvokeMethod_WatchWebRuntimeStatus(impl SRPCWebRuntimeServer, strm srpc.Stream) error
- func (SRPCWebRuntimeHandler) InvokeMethod_WebDocumentRpc(impl SRPCWebRuntimeServer, strm srpc.Stream) error
- func (SRPCWebRuntimeHandler) InvokeMethod_WebWorkerRpc(impl SRPCWebRuntimeServer, strm srpc.Stream) error
- type SRPCWebRuntimeHostClient
- type SRPCWebRuntimeHostHandler
- func (SRPCWebRuntimeHostHandler) GetMethodIDs() []string
- func (d *SRPCWebRuntimeHostHandler) GetServiceID() string
- func (d *SRPCWebRuntimeHostHandler) InvokeMethod(serviceID, methodID string, strm srpc.Stream) (bool, error)
- func (SRPCWebRuntimeHostHandler) InvokeMethod_ServiceWorkerRpc(impl SRPCWebRuntimeHostServer, strm srpc.Stream) error
- func (SRPCWebRuntimeHostHandler) InvokeMethod_WebDocumentRpc(impl SRPCWebRuntimeHostServer, strm srpc.Stream) error
- func (SRPCWebRuntimeHostHandler) InvokeMethod_WebWorkerRpc(impl SRPCWebRuntimeHostServer, strm srpc.Stream) error
- type SRPCWebRuntimeHostServer
- type SRPCWebRuntimeHost_ServiceWorkerRpcClient
- type SRPCWebRuntimeHost_ServiceWorkerRpcStream
- type SRPCWebRuntimeHost_WebDocumentRpcClient
- type SRPCWebRuntimeHost_WebDocumentRpcStream
- type SRPCWebRuntimeHost_WebWorkerRpcClient
- type SRPCWebRuntimeHost_WebWorkerRpcStream
- type SRPCWebRuntimeServer
- type SRPCWebRuntime_CreateWebDocumentStream
- type SRPCWebRuntime_RemoveWebDocumentStream
- type SRPCWebRuntime_WatchWebRuntimeStatusClient
- type SRPCWebRuntime_WatchWebRuntimeStatusStream
- type SRPCWebRuntime_WebDocumentRpcClient
- type SRPCWebRuntime_WebDocumentRpcStream
- type SRPCWebRuntime_WebWorkerRpcClient
- type SRPCWebRuntime_WebWorkerRpcStream
- type WatchWebRuntimeStatusRequest
- func (m *WatchWebRuntimeStatusRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WatchWebRuntimeStatusRequest) CloneVT() *WatchWebRuntimeStatusRequest
- func (this *WatchWebRuntimeStatusRequest) EqualMessageVT(thatMsg any) bool
- func (this *WatchWebRuntimeStatusRequest) EqualVT(that *WatchWebRuntimeStatusRequest) bool
- func (x *WatchWebRuntimeStatusRequest) MarshalJSON() ([]byte, error)
- func (x *WatchWebRuntimeStatusRequest) MarshalProtoJSON(s *json.MarshalState)
- func (x *WatchWebRuntimeStatusRequest) MarshalProtoText() string
- func (m *WatchWebRuntimeStatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WatchWebRuntimeStatusRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *WatchWebRuntimeStatusRequest) MarshalVT() (dAtA []byte, err error)
- func (*WatchWebRuntimeStatusRequest) ProtoMessage()
- func (x *WatchWebRuntimeStatusRequest) Reset()
- func (m *WatchWebRuntimeStatusRequest) SizeVT() (n int)
- func (x *WatchWebRuntimeStatusRequest) String() string
- func (x *WatchWebRuntimeStatusRequest) UnmarshalJSON(b []byte) error
- func (x *WatchWebRuntimeStatusRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WatchWebRuntimeStatusRequest) UnmarshalVT(dAtA []byte) error
- type WebDocumentStatus
- func (m *WebDocumentStatus) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebDocumentStatus) CloneVT() *WebDocumentStatus
- func (this *WebDocumentStatus) EqualMessageVT(thatMsg any) bool
- func (this *WebDocumentStatus) EqualVT(that *WebDocumentStatus) bool
- func (x *WebDocumentStatus) GetDeleted() bool
- func (x *WebDocumentStatus) GetId() string
- func (x *WebDocumentStatus) GetPermanent() bool
- func (x *WebDocumentStatus) MarshalJSON() ([]byte, error)
- func (x *WebDocumentStatus) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebDocumentStatus) MarshalProtoText() string
- func (m *WebDocumentStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebDocumentStatus) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebDocumentStatus) MarshalVT() (dAtA []byte, err error)
- func (*WebDocumentStatus) ProtoMessage()
- func (x *WebDocumentStatus) Reset()
- func (m *WebDocumentStatus) SizeVT() (n int)
- func (x *WebDocumentStatus) String() string
- func (x *WebDocumentStatus) UnmarshalJSON(b []byte) error
- func (x *WebDocumentStatus) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebDocumentStatus) UnmarshalVT(dAtA []byte) error
- type WebRenderer
- func (x WebRenderer) Enum() *WebRenderer
- func (x WebRenderer) MarshalJSON() ([]byte, error)
- func (x WebRenderer) MarshalProtoJSON(s *json.MarshalState)
- func (x WebRenderer) MarshalProtoText() string
- func (x WebRenderer) MarshalText() ([]byte, error)
- func (r WebRenderer) Resolve() WebRenderer
- func (x WebRenderer) String() string
- func (x *WebRenderer) UnmarshalJSON(b []byte) error
- func (x *WebRenderer) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *WebRenderer) UnmarshalText(b []byte) error
- func (r WebRenderer) Validate() error
- type WebRuntime
- type WebRuntimeClientInit
- func (m *WebRuntimeClientInit) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebRuntimeClientInit) CloneVT() *WebRuntimeClientInit
- func (this *WebRuntimeClientInit) EqualMessageVT(thatMsg any) bool
- func (this *WebRuntimeClientInit) EqualVT(that *WebRuntimeClientInit) bool
- func (x *WebRuntimeClientInit) GetClientType() WebRuntimeClientType
- func (x *WebRuntimeClientInit) GetClientUuid() string
- func (x *WebRuntimeClientInit) GetDisableWebLocks() bool
- func (x *WebRuntimeClientInit) GetLogicalClientId() string
- func (x *WebRuntimeClientInit) GetWebRuntimeId() string
- func (x *WebRuntimeClientInit) MarshalJSON() ([]byte, error)
- func (x *WebRuntimeClientInit) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebRuntimeClientInit) MarshalProtoText() string
- func (m *WebRuntimeClientInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRuntimeClientInit) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRuntimeClientInit) MarshalVT() (dAtA []byte, err error)
- func (*WebRuntimeClientInit) ProtoMessage()
- func (x *WebRuntimeClientInit) Reset()
- func (m *WebRuntimeClientInit) SizeVT() (n int)
- func (x *WebRuntimeClientInit) String() string
- func (x *WebRuntimeClientInit) UnmarshalJSON(b []byte) error
- func (x *WebRuntimeClientInit) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebRuntimeClientInit) UnmarshalVT(dAtA []byte) error
- type WebRuntimeClientType
- func (x WebRuntimeClientType) Enum() *WebRuntimeClientType
- func (x WebRuntimeClientType) MarshalJSON() ([]byte, error)
- func (x WebRuntimeClientType) MarshalProtoJSON(s *json.MarshalState)
- func (x WebRuntimeClientType) MarshalProtoText() string
- func (x WebRuntimeClientType) MarshalText() ([]byte, error)
- func (x WebRuntimeClientType) String() string
- func (x *WebRuntimeClientType) UnmarshalJSON(b []byte) error
- func (x *WebRuntimeClientType) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *WebRuntimeClientType) UnmarshalText(b []byte) error
- type WebRuntimeConfig
- type WebRuntimeConstructor
- type WebRuntimeController
- type WebRuntimeHandler
- type WebRuntimeHostInit
- func (m *WebRuntimeHostInit) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebRuntimeHostInit) CloneVT() *WebRuntimeHostInit
- func (this *WebRuntimeHostInit) EqualMessageVT(thatMsg any) bool
- func (this *WebRuntimeHostInit) EqualVT(that *WebRuntimeHostInit) bool
- func (x *WebRuntimeHostInit) GetWebRuntimeId() string
- func (x *WebRuntimeHostInit) MarshalJSON() ([]byte, error)
- func (x *WebRuntimeHostInit) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebRuntimeHostInit) MarshalProtoText() string
- func (m *WebRuntimeHostInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRuntimeHostInit) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRuntimeHostInit) MarshalVT() (dAtA []byte, err error)
- func (*WebRuntimeHostInit) ProtoMessage()
- func (x *WebRuntimeHostInit) Reset()
- func (m *WebRuntimeHostInit) SizeVT() (n int)
- func (x *WebRuntimeHostInit) String() string
- func (x *WebRuntimeHostInit) UnmarshalJSON(b []byte) error
- func (x *WebRuntimeHostInit) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebRuntimeHostInit) UnmarshalVT(dAtA []byte) error
- type WebRuntimeStatus
- func (m *WebRuntimeStatus) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebRuntimeStatus) CloneVT() *WebRuntimeStatus
- func (this *WebRuntimeStatus) EqualMessageVT(thatMsg any) bool
- func (this *WebRuntimeStatus) EqualVT(that *WebRuntimeStatus) bool
- func (x *WebRuntimeStatus) GetClosed() bool
- func (x *WebRuntimeStatus) GetSnapshot() bool
- func (x *WebRuntimeStatus) GetWebDocuments() []*WebDocumentStatus
- func (x *WebRuntimeStatus) MarshalJSON() ([]byte, error)
- func (x *WebRuntimeStatus) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebRuntimeStatus) MarshalProtoText() string
- func (m *WebRuntimeStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRuntimeStatus) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRuntimeStatus) MarshalVT() (dAtA []byte, err error)
- func (*WebRuntimeStatus) ProtoMessage()
- func (x *WebRuntimeStatus) Reset()
- func (m *WebRuntimeStatus) SizeVT() (n int)
- func (x *WebRuntimeStatus) String() string
- func (x *WebRuntimeStatus) UnmarshalJSON(b []byte) error
- func (x *WebRuntimeStatus) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebRuntimeStatus) UnmarshalVT(dAtA []byte) error
Constants ¶
const DefaultWebRenderer = WebRenderer_WEB_RENDERER_ELECTRON
DefaultWebRenderer is the default web renderer for native applications.
const HostServerID = "web-runtime"
HostServerID is the server ID used for bldr /b/ http calls.
const SRPCWebRuntimeHostServiceID = "web.runtime.WebRuntimeHost"
const SRPCWebRuntimeServiceID = "web.runtime.WebRuntime"
const WebRendererEnvVar = "BLDR_WEB_RENDERER"
WebRendererEnvVar is the environment variable for selecting the web renderer.
Variables ¶
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.
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.
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 ¶
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 (m *CreateWebDocumentRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*CreateWebDocumentRequest) CloneVT ¶
func (m *CreateWebDocumentRequest) CloneVT() *CreateWebDocumentRequest
func (*CreateWebDocumentRequest) EqualMessageVT ¶
func (this *CreateWebDocumentRequest) EqualMessageVT(thatMsg any) bool
func (*CreateWebDocumentRequest) EqualVT ¶
func (this *CreateWebDocumentRequest) EqualVT(that *CreateWebDocumentRequest) bool
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 (m *CreateWebDocumentResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*CreateWebDocumentResponse) CloneVT ¶
func (m *CreateWebDocumentResponse) CloneVT() *CreateWebDocumentResponse
func (*CreateWebDocumentResponse) EqualMessageVT ¶
func (this *CreateWebDocumentResponse) EqualMessageVT(thatMsg any) bool
func (*CreateWebDocumentResponse) EqualVT ¶
func (this *CreateWebDocumentResponse) EqualVT(that *CreateWebDocumentResponse) bool
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.
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 ¶
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) CreateWebDocument ¶
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 ¶
Execute executes the runtime. Returns any errors, nil if Execute is not required.
func (*Remote) GetRpcServer ¶
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) 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 (m *RemoveWebDocumentRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*RemoveWebDocumentRequest) CloneVT ¶
func (m *RemoveWebDocumentRequest) CloneVT() *RemoveWebDocumentRequest
func (*RemoveWebDocumentRequest) EqualMessageVT ¶
func (this *RemoveWebDocumentRequest) EqualMessageVT(thatMsg any) bool
func (*RemoveWebDocumentRequest) EqualVT ¶
func (this *RemoveWebDocumentRequest) EqualVT(that *RemoveWebDocumentRequest) bool
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 (m *RemoveWebDocumentResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*RemoveWebDocumentResponse) CloneVT ¶
func (m *RemoveWebDocumentResponse) CloneVT() *RemoveWebDocumentResponse
func (*RemoveWebDocumentResponse) EqualMessageVT ¶
func (this *RemoveWebDocumentResponse) EqualMessageVT(thatMsg any) bool
func (*RemoveWebDocumentResponse) EqualVT ¶
func (this *RemoveWebDocumentResponse) EqualVT(that *RemoveWebDocumentResponse) bool
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 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 (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
// 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 (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 {
// 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_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_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 (m *WatchWebRuntimeStatusRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*WatchWebRuntimeStatusRequest) CloneVT ¶
func (m *WatchWebRuntimeStatusRequest) CloneVT() *WatchWebRuntimeStatusRequest
func (*WatchWebRuntimeStatusRequest) EqualMessageVT ¶
func (this *WatchWebRuntimeStatusRequest) EqualMessageVT(thatMsg any) bool
func (*WatchWebRuntimeStatusRequest) EqualVT ¶
func (this *WatchWebRuntimeStatusRequest) EqualVT(that *WatchWebRuntimeStatusRequest) bool
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 (x *WatchWebRuntimeStatusRequest) String() 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)
// 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 (m *WebRuntimeClientInit) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*WebRuntimeClientInit) CloneVT ¶
func (m *WebRuntimeClientInit) CloneVT() *WebRuntimeClientInit
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 (x WebRuntimeClientType) Enum() *WebRuntimeClientType
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