Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeWebRtcSignal(s *WebRtcSignal, dstPeer crypto.PubKey) ([]byte, error)
- func NewLinkUUID(transportType, localPeerID, remotePeerID peer.ID) uint64
- func NewTransportUUID(transportType string, peerID peer.ID) uint64
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (x *Config) GetAllPeers() bool
- func (x *Config) GetBackoff() *backoff.Backoff
- func (x *Config) GetBlockPeers() []string
- func (c *Config) GetConfigID() string
- func (c *Config) GetDebugVals() config.DebugValues
- func (x *Config) GetDialers() map[string]*dialer.DialerOpts
- func (x *Config) GetDisableListen() bool
- func (x *Config) GetQuic() *quic.Opts
- func (x *Config) GetSignalingId() string
- func (x *Config) GetTransportPeerId() string
- func (x *Config) GetTransportType() string
- func (x *Config) GetVerbose() bool
- func (x *Config) GetWebRtc() *WebRtcConfig
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (c *Config) ParseBlockPeerIDs() ([]peer.ID, error)
- func (c *Config) ParseTransportPeerID() (peer.ID, error)
- func (*Config) ProtoMessage()
- func (x *Config) Reset()
- func (c *Config) SetTransportPeerId(peerID string)
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type Config_DialersEntry
- func (x *Config_DialersEntry) GetKey() string
- func (x *Config_DialersEntry) GetValue() *dialer.DialerOpts
- func (x *Config_DialersEntry) MarshalJSON() ([]byte, error)
- func (x *Config_DialersEntry) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config_DialersEntry) MarshalProtoText() string
- func (*Config_DialersEntry) ProtoMessage()
- func (x *Config_DialersEntry) Reset()
- func (x *Config_DialersEntry) String() string
- func (x *Config_DialersEntry) UnmarshalJSON(b []byte) error
- func (x *Config_DialersEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
- type Factory
- func (t *Factory) Construct(ctx context.Context, conf config.Config, opts controller.ConstructOpts) (controller.Controller, error)
- func (t *Factory) ConstructConfig() config.Config
- func (t *Factory) GetConfigID() string
- func (t *Factory) GetControllerID() string
- func (t *Factory) GetVersion() semver.Version
- type IceServerConfig
- func (m *IceServerConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *IceServerConfig) CloneVT() *IceServerConfig
- func (this *IceServerConfig) EqualMessageVT(thatMsg any) bool
- func (this *IceServerConfig) EqualVT(that *IceServerConfig) bool
- func (m *IceServerConfig) GetCredential() isIceServerConfig_Credential
- func (x *IceServerConfig) GetOauth() *IceServerConfig_OauthCredential
- func (x *IceServerConfig) GetPassword() string
- func (x *IceServerConfig) GetUrls() []string
- func (x *IceServerConfig) GetUsername() string
- func (x *IceServerConfig) MarshalJSON() ([]byte, error)
- func (x *IceServerConfig) MarshalProtoJSON(s *json.MarshalState)
- func (x *IceServerConfig) MarshalProtoText() string
- func (m *IceServerConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *IceServerConfig) MarshalToVT(dAtA []byte) (int, error)
- func (m *IceServerConfig) MarshalVT() (dAtA []byte, err error)
- func (*IceServerConfig) ProtoMessage()
- func (x *IceServerConfig) Reset()
- func (m *IceServerConfig) SizeVT() (n int)
- func (x *IceServerConfig) String() string
- func (c *IceServerConfig) ToICEServer() webrtc.ICEServer
- func (x *IceServerConfig) UnmarshalJSON(b []byte) error
- func (x *IceServerConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *IceServerConfig) UnmarshalVT(dAtA []byte) error
- type IceServerConfig_Oauth
- func (m *IceServerConfig_Oauth) CloneVT() *IceServerConfig_Oauth
- func (this *IceServerConfig_Oauth) EqualVT(thatIface isIceServerConfig_Credential) bool
- func (m *IceServerConfig_Oauth) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *IceServerConfig_Oauth) MarshalToVT(dAtA []byte) (int, error)
- func (m *IceServerConfig_Oauth) SizeVT() (n int)
- type IceServerConfig_OauthCredential
- func (m *IceServerConfig_OauthCredential) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *IceServerConfig_OauthCredential) CloneVT() *IceServerConfig_OauthCredential
- func (this *IceServerConfig_OauthCredential) EqualMessageVT(thatMsg any) bool
- func (this *IceServerConfig_OauthCredential) EqualVT(that *IceServerConfig_OauthCredential) bool
- func (x *IceServerConfig_OauthCredential) GetAccessToken() string
- func (x *IceServerConfig_OauthCredential) GetMacKey() string
- func (x *IceServerConfig_OauthCredential) MarshalJSON() ([]byte, error)
- func (x *IceServerConfig_OauthCredential) MarshalProtoJSON(s *json.MarshalState)
- func (x *IceServerConfig_OauthCredential) MarshalProtoText() string
- func (m *IceServerConfig_OauthCredential) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *IceServerConfig_OauthCredential) MarshalToVT(dAtA []byte) (int, error)
- func (m *IceServerConfig_OauthCredential) MarshalVT() (dAtA []byte, err error)
- func (*IceServerConfig_OauthCredential) ProtoMessage()
- func (x *IceServerConfig_OauthCredential) Reset()
- func (m *IceServerConfig_OauthCredential) SizeVT() (n int)
- func (x *IceServerConfig_OauthCredential) String() string
- func (o *IceServerConfig_OauthCredential) ToOauthCredential() webrtc.OAuthCredential
- func (x *IceServerConfig_OauthCredential) UnmarshalJSON(b []byte) error
- func (x *IceServerConfig_OauthCredential) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *IceServerConfig_OauthCredential) UnmarshalVT(dAtA []byte) error
- type IceServerConfig_Password
- func (m *IceServerConfig_Password) CloneVT() *IceServerConfig_Password
- func (this *IceServerConfig_Password) EqualVT(thatIface isIceServerConfig_Credential) bool
- func (m *IceServerConfig_Password) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *IceServerConfig_Password) MarshalToVT(dAtA []byte) (int, error)
- func (m *IceServerConfig_Password) SizeVT() (n int)
- type IceTransportPolicy
- func (x IceTransportPolicy) Enum() *IceTransportPolicy
- func (x IceTransportPolicy) MarshalJSON() ([]byte, error)
- func (x IceTransportPolicy) MarshalProtoJSON(s *json.MarshalState)
- func (x IceTransportPolicy) MarshalProtoText() string
- func (x IceTransportPolicy) MarshalText() ([]byte, error)
- func (x IceTransportPolicy) String() string
- func (c IceTransportPolicy) ToICETransportPolicy() webrtc.ICETransportPolicy
- func (x *IceTransportPolicy) UnmarshalJSON(b []byte) error
- func (x *IceTransportPolicy) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *IceTransportPolicy) UnmarshalText(b []byte) error
- type Link
- type WebRTC
- func (w *WebRTC) Close() error
- func (w *WebRTC) DialPeer(ctx context.Context, peerID peer.ID, addr string) (fatal bool, err error)
- func (w *WebRTC) Execute(ctx context.Context) error
- func (w *WebRTC) GetPeerDialer(ctx context.Context, peerID peer.ID) (*dialer.DialerOpts, error)
- func (w *WebRTC) GetPeerID() peer.ID
- func (w *WebRTC) GetUUID() uint64
- func (w *WebRTC) GetVerbose() bool
- func (w *WebRTC) MatchTransportType(transportType string) bool
- type WebRTCSignalHandler
- type WebRtcConfig
- func (m *WebRtcConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebRtcConfig) CloneVT() *WebRtcConfig
- func (this *WebRtcConfig) EqualMessageVT(thatMsg any) bool
- func (this *WebRtcConfig) EqualVT(that *WebRtcConfig) bool
- func (x *WebRtcConfig) GetIceCandidatePoolSize() uint32
- func (x *WebRtcConfig) GetIceServers() []*IceServerConfig
- func (x *WebRtcConfig) GetIceTransportPolicy() IceTransportPolicy
- func (x *WebRtcConfig) MarshalJSON() ([]byte, error)
- func (x *WebRtcConfig) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebRtcConfig) MarshalProtoText() string
- func (m *WebRtcConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRtcConfig) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRtcConfig) MarshalVT() (dAtA []byte, err error)
- func (*WebRtcConfig) ProtoMessage()
- func (x *WebRtcConfig) Reset()
- func (m *WebRtcConfig) SizeVT() (n int)
- func (x *WebRtcConfig) String() string
- func (c *WebRtcConfig) ToWebRtcConfiguration() *webrtc.Configuration
- func (x *WebRtcConfig) UnmarshalJSON(b []byte) error
- func (x *WebRtcConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebRtcConfig) UnmarshalVT(dAtA []byte) error
- type WebRtcIce
- func (m *WebRtcIce) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebRtcIce) CloneVT() *WebRtcIce
- func (this *WebRtcIce) EqualMessageVT(thatMsg any) bool
- func (this *WebRtcIce) EqualVT(that *WebRtcIce) bool
- func (x *WebRtcIce) GetCandidate() string
- func (x *WebRtcIce) MarshalJSON() ([]byte, error)
- func (x *WebRtcIce) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebRtcIce) MarshalProtoText() string
- func (m *WebRtcIce) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRtcIce) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRtcIce) MarshalVT() (dAtA []byte, err error)
- func (s *WebRtcIce) ParseICECandidateInit() (*webrtc.ICECandidateInit, error)
- func (*WebRtcIce) ProtoMessage()
- func (x *WebRtcIce) Reset()
- func (m *WebRtcIce) SizeVT() (n int)
- func (x *WebRtcIce) String() string
- func (x *WebRtcIce) UnmarshalJSON(b []byte) error
- func (x *WebRtcIce) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebRtcIce) UnmarshalVT(dAtA []byte) error
- func (s *WebRtcIce) Validate() error
- type WebRtcSdp
- func (m *WebRtcSdp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebRtcSdp) CloneVT() *WebRtcSdp
- func (this *WebRtcSdp) EqualMessageVT(thatMsg any) bool
- func (this *WebRtcSdp) EqualVT(that *WebRtcSdp) bool
- func (x *WebRtcSdp) GetSdp() string
- func (x *WebRtcSdp) GetSdpType() string
- func (x *WebRtcSdp) GetTxSeqno() uint64
- func (x *WebRtcSdp) MarshalJSON() ([]byte, error)
- func (x *WebRtcSdp) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebRtcSdp) MarshalProtoText() string
- func (m *WebRtcSdp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRtcSdp) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRtcSdp) MarshalVT() (dAtA []byte, err error)
- func (s *WebRtcSdp) ParseSDP() (*sdp.SessionDescription, error)
- func (s *WebRtcSdp) ParseSDPType() webrtc.SDPType
- func (*WebRtcSdp) ProtoMessage()
- func (x *WebRtcSdp) Reset()
- func (m *WebRtcSdp) SizeVT() (n int)
- func (x *WebRtcSdp) String() string
- func (s *WebRtcSdp) ToSessionDescription() *webrtc.SessionDescription
- func (x *WebRtcSdp) UnmarshalJSON(b []byte) error
- func (x *WebRtcSdp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebRtcSdp) UnmarshalVT(dAtA []byte) error
- func (s *WebRtcSdp) Validate() error
- type WebRtcSignal
- func (m *WebRtcSignal) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *WebRtcSignal) CloneVT() *WebRtcSignal
- func (this *WebRtcSignal) EqualMessageVT(thatMsg any) bool
- func (this *WebRtcSignal) EqualVT(that *WebRtcSignal) bool
- func (m *WebRtcSignal) GetBody() isWebRtcSignal_Body
- func (x *WebRtcSignal) GetIce() *WebRtcIce
- func (x *WebRtcSignal) GetRequestOffer() uint64
- func (x *WebRtcSignal) GetSdp() *WebRtcSdp
- func (x *WebRtcSignal) MarshalJSON() ([]byte, error)
- func (x *WebRtcSignal) MarshalProtoJSON(s *json.MarshalState)
- func (x *WebRtcSignal) MarshalProtoText() string
- func (m *WebRtcSignal) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal) MarshalVT() (dAtA []byte, err error)
- func (*WebRtcSignal) ProtoMessage()
- func (x *WebRtcSignal) Reset()
- func (m *WebRtcSignal) SizeVT() (n int)
- func (x *WebRtcSignal) String() string
- func (x *WebRtcSignal) UnmarshalJSON(b []byte) error
- func (x *WebRtcSignal) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *WebRtcSignal) UnmarshalVT(dAtA []byte) error
- func (m *WebRtcSignal) Validate() error
- type WebRtcSignal_Ice
- func (m *WebRtcSignal_Ice) CloneVT() *WebRtcSignal_Ice
- func (this *WebRtcSignal_Ice) EqualVT(thatIface isWebRtcSignal_Body) bool
- func (m *WebRtcSignal_Ice) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal_Ice) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal_Ice) SizeVT() (n int)
- type WebRtcSignal_RequestOffer
- func (m *WebRtcSignal_RequestOffer) CloneVT() *WebRtcSignal_RequestOffer
- func (this *WebRtcSignal_RequestOffer) EqualVT(thatIface isWebRtcSignal_Body) bool
- func (m *WebRtcSignal_RequestOffer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal_RequestOffer) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal_RequestOffer) SizeVT() (n int)
- type WebRtcSignal_Sdp
- func (m *WebRtcSignal_Sdp) CloneVT() *WebRtcSignal_Sdp
- func (this *WebRtcSignal_Sdp) EqualVT(thatIface isWebRtcSignal_Body) bool
- func (m *WebRtcSignal_Sdp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal_Sdp) MarshalToVT(dAtA []byte) (int, error)
- func (m *WebRtcSignal_Sdp) SizeVT() (n int)
Constants ¶
const ConfigID = ControllerID
ConfigID is the string used to identify this config object.
const ControllerID = "bifrost/webrtc"
ControllerID is the WebRTC controller ID.
const TransportType = "webrtc"
TransportType is the transport type identifier for this transport.
const WebRTCSignalHandlerControllerID = ControllerID + "/signal-handler"
WebRTCSignalHandlerControllerID is the controller ID for WebRTCSignalHandler
Variables ¶
var ( IceTransportPolicy_name = map[int32]string{ 0: "IceTransportPolicy_ALL", 1: "IceTransportPolicy_RELAY", } IceTransportPolicy_value = map[string]int32{ "IceTransportPolicy_ALL": 0, "IceTransportPolicy_RELAY": 1, } )
Enum value maps for IceTransportPolicy.
var SignalingCryptContext = "github.com/aperturerobotics/bifrost 2024-01-15 17:58:55 webrtc signaling"
SignalingCryptContext is the encryption context to use for the signaling messages.
var SignalingProtocolID protocol.ID = signaling.ProtocolID
SignalingProtocolID is the default protocol id to use for the signaling client.
var Version = semver.MustParse("0.0.1")
Version is the version of the implementation.
Functions ¶
func EncodeWebRtcSignal ¶
func EncodeWebRtcSignal(s *WebRtcSignal, dstPeer crypto.PubKey) ([]byte, error)
EncodeWebRtcSignal marshals and encrypts the WebRtcSignal message.
func NewLinkUUID ¶
NewLinkUUID builds the UUID for a link
Types ¶
type Config ¶
type Config struct { // SignalingId is the signaling channel identifier. // Cannot be empty. SignalingId string `protobuf:"bytes,1,opt,name=signaling_id,json=signalingId,proto3" json:"signalingId,omitempty"` // TransportPeerId sets the peer ID to attach the transport to. // If unset, attaches to any running peer with a private key. // Must match the transport peer ID of the signaling transport. TransportPeerId string `protobuf:"bytes,2,opt,name=transport_peer_id,json=transportPeerId,proto3" json:"transportPeerId,omitempty"` // TransportType overrides the transport type id for dial addresses. // Defaults to "webrtc" // Configures the scheme for addr matching to this transport. // E.x.: webrtc:// TransportType string `protobuf:"bytes,3,opt,name=transport_type,json=transportType,proto3" json:"transportType,omitempty"` // Quic contains the quic protocol options. // // The WebRTC transport always disables FEC and several other UDP-centric // features which are unnecessary due to the "reliable" nature of WebRTC. Quic *quic.Opts `protobuf:"bytes,4,opt,name=quic,proto3" json:"quic,omitempty"` // WebRtc contains the WebRTC protocol options. WebRtc *WebRtcConfig `protobuf:"bytes,5,opt,name=web_rtc,json=webRtc,proto3" json:"webRtc,omitempty"` // Backoff is the backoff config for connecting to a PeerConnection. // If unset, defaults to reasonable defaults. Backoff *backoff.Backoff `protobuf:"bytes,6,opt,name=backoff,proto3" json:"backoff,omitempty"` // Dialers maps peer IDs to dialers. // This allows mapping which peer ID should be dialed via this transport. Dialers map[string]*dialer.DialerOpts `` /* 155-byte string literal not displayed */ // AllPeers tells the transport to attempt to negotiate a WebRTC session with // any peer, even those not listed in the Dialers map. AllPeers bool `protobuf:"varint,8,opt,name=all_peers,json=allPeers,proto3" json:"allPeers,omitempty"` // DisableListen disables listening for incoming Links. // If set, we will only dial out, not accept incoming links. DisableListen bool `protobuf:"varint,9,opt,name=disable_listen,json=disableListen,proto3" json:"disableListen,omitempty"` // BlockPeers is a list of peer ids that will not be contacted via this transport. BlockPeers []string `protobuf:"bytes,10,rep,name=block_peers,json=blockPeers,proto3" json:"blockPeers,omitempty"` // Verbose enables very verbose logging. Verbose bool `protobuf:"varint,11,opt,name=verbose,proto3" json:"verbose,omitempty"` // contains filtered or unexported fields }
Config is the configuration for the WebRTC Signal RPC transport.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) EqualsConfig ¶
EqualsConfig checks if the other config is equal.
func (*Config) GetAllPeers ¶
func (*Config) GetBackoff ¶
func (*Config) GetBlockPeers ¶
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type. This string is stored with the encoded config.
func (*Config) GetDebugVals ¶
func (c *Config) GetDebugVals() config.DebugValues
GetDebugVals returns the directive arguments as key/value pairs. This should be something like param1="test", param2="test". This is not necessarily unique, and is primarily intended for display.
func (*Config) GetDialers ¶
func (x *Config) GetDialers() map[string]*dialer.DialerOpts
func (*Config) GetDisableListen ¶
func (*Config) GetSignalingId ¶
func (*Config) GetTransportPeerId ¶
func (*Config) GetTransportType ¶
func (*Config) GetVerbose ¶
func (*Config) GetWebRtc ¶
func (x *Config) GetWebRtc() *WebRtcConfig
func (*Config) MarshalJSON ¶ added in v0.29.0
MarshalJSON marshals the Config to JSON.
func (*Config) MarshalProtoJSON ¶ added in v0.29.0
func (x *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalProtoText ¶ added in v0.29.2
func (*Config) MarshalToSizedBufferVT ¶
func (*Config) ParseBlockPeerIDs ¶
ParseBlockPeerIDs parses the remote peer IDs to not allow.
func (*Config) ParseTransportPeerID ¶
ParseTransportPeerID parses the node peer ID if it is not empty.
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) SetTransportPeerId ¶
SetTransportPeerId sets the node peer ID field.
func (*Config) UnmarshalJSON ¶ added in v0.29.0
UnmarshalJSON unmarshals the Config from JSON.
func (*Config) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶
type Config_DialersEntry ¶ added in v0.29.0
type Config_DialersEntry struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *dialer.DialerOpts `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Config_DialersEntry) GetKey ¶ added in v0.29.0
func (x *Config_DialersEntry) GetKey() string
func (*Config_DialersEntry) GetValue ¶ added in v0.29.0
func (x *Config_DialersEntry) GetValue() *dialer.DialerOpts
func (*Config_DialersEntry) MarshalJSON ¶ added in v0.29.0
func (x *Config_DialersEntry) MarshalJSON() ([]byte, error)
MarshalJSON marshals the Config_DialersEntry to JSON.
func (*Config_DialersEntry) MarshalProtoJSON ¶ added in v0.29.0
func (x *Config_DialersEntry) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config_DialersEntry message to JSON.
func (*Config_DialersEntry) MarshalProtoText ¶ added in v0.29.2
func (x *Config_DialersEntry) MarshalProtoText() string
func (*Config_DialersEntry) ProtoMessage ¶ added in v0.29.0
func (*Config_DialersEntry) ProtoMessage()
func (*Config_DialersEntry) Reset ¶ added in v0.29.0
func (x *Config_DialersEntry) Reset()
func (*Config_DialersEntry) String ¶ added in v0.29.2
func (x *Config_DialersEntry) String() string
func (*Config_DialersEntry) UnmarshalJSON ¶ added in v0.29.0
func (x *Config_DialersEntry) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the Config_DialersEntry from JSON.
func (*Config_DialersEntry) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *Config_DialersEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config_DialersEntry message from JSON.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory constructs the transport.
func (*Factory) Construct ¶
func (t *Factory) Construct( ctx context.Context, conf config.Config, opts controller.ConstructOpts, ) (controller.Controller, error)
Construct constructs the associated controller given configuration. The transport's identity (private key) comes from a GetNode lookup.
func (*Factory) ConstructConfig ¶
ConstructConfig constructs an instance of the controller configuration.
func (*Factory) GetConfigID ¶
GetConfigID returns the configuration ID for the controller.
func (*Factory) GetControllerID ¶
GetControllerID returns the unique ID for the controller.
func (*Factory) GetVersion ¶
GetVersion returns the version of this controller.
type IceServerConfig ¶
type IceServerConfig struct { // Urls is the list of URLs for the ICE server. // // Format: stun:{url} or turn:{url} or turns:{url}?transport=tcp // Examples: // - stun:stun.l.google.com:19302 // - stun:stun.stunprotocol.org:3478 // - turns:google.de?transport=tcp Urls []string `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"` // Username is the username for the ICE server. Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // Credential contains the ice server credential, if any. // // Types that are assignable to Credential: // // *IceServerConfig_Password // *IceServerConfig_Oauth Credential isIceServerConfig_Credential `protobuf_oneof:"credential"` // contains filtered or unexported fields }
IceServer is a WebRTC ICE server config.
func (*IceServerConfig) CloneMessageVT ¶
func (m *IceServerConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*IceServerConfig) CloneVT ¶
func (m *IceServerConfig) CloneVT() *IceServerConfig
func (*IceServerConfig) EqualMessageVT ¶
func (this *IceServerConfig) EqualMessageVT(thatMsg any) bool
func (*IceServerConfig) EqualVT ¶
func (this *IceServerConfig) EqualVT(that *IceServerConfig) bool
func (*IceServerConfig) GetCredential ¶
func (m *IceServerConfig) GetCredential() isIceServerConfig_Credential
func (*IceServerConfig) GetOauth ¶
func (x *IceServerConfig) GetOauth() *IceServerConfig_OauthCredential
func (*IceServerConfig) GetPassword ¶
func (x *IceServerConfig) GetPassword() string
func (*IceServerConfig) GetUrls ¶
func (x *IceServerConfig) GetUrls() []string
func (*IceServerConfig) GetUsername ¶
func (x *IceServerConfig) GetUsername() string
func (*IceServerConfig) MarshalJSON ¶ added in v0.29.0
func (x *IceServerConfig) MarshalJSON() ([]byte, error)
MarshalJSON marshals the IceServerConfig to JSON.
func (*IceServerConfig) MarshalProtoJSON ¶ added in v0.29.0
func (x *IceServerConfig) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the IceServerConfig message to JSON.
func (*IceServerConfig) MarshalProtoText ¶ added in v0.29.2
func (x *IceServerConfig) MarshalProtoText() string
func (*IceServerConfig) MarshalToSizedBufferVT ¶
func (m *IceServerConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*IceServerConfig) MarshalToVT ¶
func (m *IceServerConfig) MarshalToVT(dAtA []byte) (int, error)
func (*IceServerConfig) MarshalVT ¶
func (m *IceServerConfig) MarshalVT() (dAtA []byte, err error)
func (*IceServerConfig) ProtoMessage ¶
func (*IceServerConfig) ProtoMessage()
func (*IceServerConfig) Reset ¶
func (x *IceServerConfig) Reset()
func (*IceServerConfig) SizeVT ¶
func (m *IceServerConfig) SizeVT() (n int)
func (*IceServerConfig) String ¶
func (x *IceServerConfig) String() string
func (*IceServerConfig) ToICEServer ¶
func (c *IceServerConfig) ToICEServer() webrtc.ICEServer
ToICEServer converts the IceServerConfig to a webrtc.ICEServer.
func (*IceServerConfig) UnmarshalJSON ¶ added in v0.29.0
func (x *IceServerConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the IceServerConfig from JSON.
func (*IceServerConfig) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *IceServerConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the IceServerConfig message from JSON.
func (*IceServerConfig) UnmarshalVT ¶
func (m *IceServerConfig) UnmarshalVT(dAtA []byte) error
type IceServerConfig_Oauth ¶
type IceServerConfig_Oauth struct { // Oauth contains an OAuth credential. Oauth *IceServerConfig_OauthCredential `protobuf:"bytes,4,opt,name=oauth,proto3,oneof"` }
func (*IceServerConfig_Oauth) CloneVT ¶
func (m *IceServerConfig_Oauth) CloneVT() *IceServerConfig_Oauth
func (*IceServerConfig_Oauth) EqualVT ¶
func (this *IceServerConfig_Oauth) EqualVT(thatIface isIceServerConfig_Credential) bool
func (*IceServerConfig_Oauth) MarshalToSizedBufferVT ¶
func (m *IceServerConfig_Oauth) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*IceServerConfig_Oauth) MarshalToVT ¶
func (m *IceServerConfig_Oauth) MarshalToVT(dAtA []byte) (int, error)
func (*IceServerConfig_Oauth) SizeVT ¶
func (m *IceServerConfig_Oauth) SizeVT() (n int)
type IceServerConfig_OauthCredential ¶
type IceServerConfig_OauthCredential struct { // MacKey is a base64-url format. MacKey string `protobuf:"bytes,1,opt,name=mac_key,json=macKey,proto3" json:"macKey,omitempty"` // AccessToken is the access token in base64-encoded format. AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"accessToken,omitempty"` // contains filtered or unexported fields }
OauthCredential is an OAuth credential information for the ICE server.
func (*IceServerConfig_OauthCredential) CloneMessageVT ¶
func (m *IceServerConfig_OauthCredential) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*IceServerConfig_OauthCredential) CloneVT ¶
func (m *IceServerConfig_OauthCredential) CloneVT() *IceServerConfig_OauthCredential
func (*IceServerConfig_OauthCredential) EqualMessageVT ¶
func (this *IceServerConfig_OauthCredential) EqualMessageVT(thatMsg any) bool
func (*IceServerConfig_OauthCredential) EqualVT ¶
func (this *IceServerConfig_OauthCredential) EqualVT(that *IceServerConfig_OauthCredential) bool
func (*IceServerConfig_OauthCredential) GetAccessToken ¶
func (x *IceServerConfig_OauthCredential) GetAccessToken() string
func (*IceServerConfig_OauthCredential) GetMacKey ¶
func (x *IceServerConfig_OauthCredential) GetMacKey() string
func (*IceServerConfig_OauthCredential) MarshalJSON ¶ added in v0.29.0
func (x *IceServerConfig_OauthCredential) MarshalJSON() ([]byte, error)
MarshalJSON marshals the IceServerConfig_OauthCredential to JSON.
func (*IceServerConfig_OauthCredential) MarshalProtoJSON ¶ added in v0.29.0
func (x *IceServerConfig_OauthCredential) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the IceServerConfig_OauthCredential message to JSON.
func (*IceServerConfig_OauthCredential) MarshalProtoText ¶ added in v0.29.2
func (x *IceServerConfig_OauthCredential) MarshalProtoText() string
func (*IceServerConfig_OauthCredential) MarshalToSizedBufferVT ¶
func (m *IceServerConfig_OauthCredential) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*IceServerConfig_OauthCredential) MarshalToVT ¶
func (m *IceServerConfig_OauthCredential) MarshalToVT(dAtA []byte) (int, error)
func (*IceServerConfig_OauthCredential) MarshalVT ¶
func (m *IceServerConfig_OauthCredential) MarshalVT() (dAtA []byte, err error)
func (*IceServerConfig_OauthCredential) ProtoMessage ¶
func (*IceServerConfig_OauthCredential) ProtoMessage()
func (*IceServerConfig_OauthCredential) Reset ¶
func (x *IceServerConfig_OauthCredential) Reset()
func (*IceServerConfig_OauthCredential) SizeVT ¶
func (m *IceServerConfig_OauthCredential) SizeVT() (n int)
func (*IceServerConfig_OauthCredential) String ¶
func (x *IceServerConfig_OauthCredential) String() string
func (*IceServerConfig_OauthCredential) ToOauthCredential ¶
func (o *IceServerConfig_OauthCredential) ToOauthCredential() webrtc.OAuthCredential
ToOauthCredential converts to a webrtc credential.
func (*IceServerConfig_OauthCredential) UnmarshalJSON ¶ added in v0.29.0
func (x *IceServerConfig_OauthCredential) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the IceServerConfig_OauthCredential from JSON.
func (*IceServerConfig_OauthCredential) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *IceServerConfig_OauthCredential) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the IceServerConfig_OauthCredential message from JSON.
func (*IceServerConfig_OauthCredential) UnmarshalVT ¶
func (m *IceServerConfig_OauthCredential) UnmarshalVT(dAtA []byte) error
type IceServerConfig_Password ¶
type IceServerConfig_Password struct { // Password contains the ICE server password. Password string `protobuf:"bytes,3,opt,name=password,proto3,oneof"` }
func (*IceServerConfig_Password) CloneVT ¶
func (m *IceServerConfig_Password) CloneVT() *IceServerConfig_Password
func (*IceServerConfig_Password) EqualVT ¶
func (this *IceServerConfig_Password) EqualVT(thatIface isIceServerConfig_Credential) bool
func (*IceServerConfig_Password) MarshalToSizedBufferVT ¶
func (m *IceServerConfig_Password) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*IceServerConfig_Password) MarshalToVT ¶
func (m *IceServerConfig_Password) MarshalToVT(dAtA []byte) (int, error)
func (*IceServerConfig_Password) SizeVT ¶
func (m *IceServerConfig_Password) SizeVT() (n int)
type IceTransportPolicy ¶
type IceTransportPolicy int32
IceTransportPolicy contains the set of allowed ICE transport policies.
const ( // IceTransportPolicy_ALL allows any kind of ICE candidate. IceTransportPolicy_IceTransportPolicy_ALL IceTransportPolicy = 0 // IceTransportPolicy_RELAY allows only media relay candidates (TURN). IceTransportPolicy_IceTransportPolicy_RELAY IceTransportPolicy = 1 )
func (IceTransportPolicy) Enum ¶
func (x IceTransportPolicy) Enum() *IceTransportPolicy
func (IceTransportPolicy) MarshalJSON ¶ added in v0.29.0
func (x IceTransportPolicy) MarshalJSON() ([]byte, error)
MarshalJSON marshals the IceTransportPolicy to JSON.
func (IceTransportPolicy) MarshalProtoJSON ¶ added in v0.29.0
func (x IceTransportPolicy) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the IceTransportPolicy to JSON.
func (IceTransportPolicy) MarshalProtoText ¶ added in v0.29.2
func (x IceTransportPolicy) MarshalProtoText() string
func (IceTransportPolicy) MarshalText ¶ added in v0.29.0
func (x IceTransportPolicy) MarshalText() ([]byte, error)
MarshalText marshals the IceTransportPolicy to text.
func (IceTransportPolicy) String ¶
func (x IceTransportPolicy) String() string
func (IceTransportPolicy) ToICETransportPolicy ¶
func (c IceTransportPolicy) ToICETransportPolicy() webrtc.ICETransportPolicy
ToICETransportPolicy converts the IceTransportPolicy to a webrtc.ICETransportPolicy.
func (*IceTransportPolicy) UnmarshalJSON ¶ added in v0.29.0
func (x *IceTransportPolicy) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the IceTransportPolicy from JSON.
func (*IceTransportPolicy) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *IceTransportPolicy) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the IceTransportPolicy from JSON.
func (*IceTransportPolicy) UnmarshalText ¶ added in v0.29.0
func (x *IceTransportPolicy) UnmarshalText(b []byte) error
UnmarshalText unmarshals the IceTransportPolicy from text.
type WebRTC ¶
type WebRTC struct {
// contains filtered or unexported fields
}
WebRTC implements a WebRTC transport.
func NewWebRTC ¶
func NewWebRTC( ctx context.Context, le *logrus.Entry, b bus.Bus, conf *Config, pKey crypto.PrivKey, c transport.TransportHandler, ) (*WebRTC, error)
NewWebRTC builds a new WebRTC transport.
ServeHTTP is implemented and can be used with a standard HTTP mux. Optionally listens on an address.
func (*WebRTC) DialPeer ¶
func (w *WebRTC) DialPeer( ctx context.Context, peerID peer.ID, addr string, ) (fatal bool, err error)
DialPeer dials a peer given an address. The yielded link should be emitted to the transport handler. DialPeer should return nil if the link was established. DialPeer will then not be called again for the same peer ID and address tuple until the yielded link is lost. Returns fatal and error.
func (*WebRTC) GetPeerDialer ¶
GetPeerDialer returns the dialing information for a peer. Called when resolving EstablishLink. Return nil, nil to indicate not found or unavailable.
func (*WebRTC) GetVerbose ¶
GetVerbose gets if verbose logging is enabled.
func (*WebRTC) MatchTransportType ¶
MatchTransportType checks if the given transport type ID matches this transport. If returns true, the transport controller will call DialPeer with that tptaddr. E.x.: "udp-quic" or "ws"
type WebRTCSignalHandler ¶
type WebRTCSignalHandler struct {
// contains filtered or unexported fields
}
WebRTCSignalHandler handles incoming signaling messages from other peers.
This controller is usually started & managed by the WebRTC transport.
func NewWebRTCSignalHandler ¶
func NewWebRTCSignalHandler(t *WebRTC) *WebRTCSignalHandler
NewWebRTCSignalHandler constructs the WebRTCSignalHandler controller.
Listens for HandleSignalPeer directives and calls the transport.
func (*WebRTCSignalHandler) Close ¶
func (c *WebRTCSignalHandler) Close() error
Close releases any resources used by the controller. Error indicates any issue encountered releasing.
func (*WebRTCSignalHandler) Execute ¶
func (c *WebRTCSignalHandler) Execute(ctx context.Context) error
Execute executes the controller goroutine. Returning nil ends execution. Returning an error triggers a retry with backoff.
func (*WebRTCSignalHandler) GetControllerInfo ¶
func (c *WebRTCSignalHandler) GetControllerInfo() *controller.Info
GetControllerInfo returns information about the controller.
func (*WebRTCSignalHandler) HandleDirective ¶
func (c *WebRTCSignalHandler) HandleDirective(ctx context.Context, di directive.Instance) ([]directive.Resolver, error)
HandleDirective asks if the handler can resolve the directive. If it can, it returns resolver(s). If not, returns nil. It is safe to add a reference to the directive during this call. The passed context is canceled when the directive instance expires. NOTE: the passed context is not canceled when the handler is removed.
type WebRtcConfig ¶
type WebRtcConfig struct { // IceServers contains the list of ICE servers to use. IceServers []*IceServerConfig `protobuf:"bytes,1,rep,name=ice_servers,json=iceServers,proto3" json:"iceServers,omitempty"` // IceTransportPolicy defines the policy for permitted ICE candidates. // Optional. IceTransportPolicy IceTransportPolicy `protobuf:"varint,2,opt,name=ice_transport_policy,json=iceTransportPolicy,proto3" json:"iceTransportPolicy,omitempty"` // IceCandidatePoolSize defines the size of the prefetched ICE pool. // Optional. IceCandidatePoolSize uint32 `protobuf:"varint,3,opt,name=ice_candidate_pool_size,json=iceCandidatePoolSize,proto3" json:"iceCandidatePoolSize,omitempty"` // contains filtered or unexported fields }
WebRtcConfig configures the WebRTC PeerConnection.
func (*WebRtcConfig) CloneMessageVT ¶
func (m *WebRtcConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*WebRtcConfig) CloneVT ¶
func (m *WebRtcConfig) CloneVT() *WebRtcConfig
func (*WebRtcConfig) EqualMessageVT ¶
func (this *WebRtcConfig) EqualMessageVT(thatMsg any) bool
func (*WebRtcConfig) EqualVT ¶
func (this *WebRtcConfig) EqualVT(that *WebRtcConfig) bool
func (*WebRtcConfig) GetIceCandidatePoolSize ¶
func (x *WebRtcConfig) GetIceCandidatePoolSize() uint32
func (*WebRtcConfig) GetIceServers ¶
func (x *WebRtcConfig) GetIceServers() []*IceServerConfig
func (*WebRtcConfig) GetIceTransportPolicy ¶
func (x *WebRtcConfig) GetIceTransportPolicy() IceTransportPolicy
func (*WebRtcConfig) MarshalJSON ¶ added in v0.29.0
func (x *WebRtcConfig) MarshalJSON() ([]byte, error)
MarshalJSON marshals the WebRtcConfig to JSON.
func (*WebRtcConfig) MarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcConfig) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the WebRtcConfig message to JSON.
func (*WebRtcConfig) MarshalProtoText ¶ added in v0.29.2
func (x *WebRtcConfig) MarshalProtoText() string
func (*WebRtcConfig) MarshalToSizedBufferVT ¶
func (m *WebRtcConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*WebRtcConfig) MarshalToVT ¶
func (m *WebRtcConfig) MarshalToVT(dAtA []byte) (int, error)
func (*WebRtcConfig) MarshalVT ¶
func (m *WebRtcConfig) MarshalVT() (dAtA []byte, err error)
func (*WebRtcConfig) ProtoMessage ¶
func (*WebRtcConfig) ProtoMessage()
func (*WebRtcConfig) Reset ¶
func (x *WebRtcConfig) Reset()
func (*WebRtcConfig) SizeVT ¶
func (m *WebRtcConfig) SizeVT() (n int)
func (*WebRtcConfig) String ¶
func (x *WebRtcConfig) String() string
func (*WebRtcConfig) ToWebRtcConfiguration ¶
func (c *WebRtcConfig) ToWebRtcConfiguration() *webrtc.Configuration
ToWebRtcConfiguration converts the WebRtcConfig into a webrtc.Configuration.
func (*WebRtcConfig) UnmarshalJSON ¶ added in v0.29.0
func (x *WebRtcConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the WebRtcConfig from JSON.
func (*WebRtcConfig) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the WebRtcConfig message from JSON.
func (*WebRtcConfig) UnmarshalVT ¶
func (m *WebRtcConfig) UnmarshalVT(dAtA []byte) error
type WebRtcIce ¶
type WebRtcIce struct { // Candidate contains the JSON-encoded ICE candidate. Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"` // contains filtered or unexported fields }
WebRtcIce contains an ICE candidate.
func NewWebRtcIce ¶
NewWebRtcIce constructs a new WebRtcIce from a ICECandidateInit.
func (*WebRtcIce) CloneMessageVT ¶
func (m *WebRtcIce) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*WebRtcIce) EqualMessageVT ¶
func (*WebRtcIce) GetCandidate ¶
func (*WebRtcIce) MarshalJSON ¶ added in v0.29.0
MarshalJSON marshals the WebRtcIce to JSON.
func (*WebRtcIce) MarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcIce) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the WebRtcIce message to JSON.
func (*WebRtcIce) MarshalProtoText ¶ added in v0.29.2
func (*WebRtcIce) MarshalToSizedBufferVT ¶
func (*WebRtcIce) ParseICECandidateInit ¶
ParseICECandidateInit parses the ICECandidate from the JSON encoded body.
func (*WebRtcIce) ProtoMessage ¶
func (*WebRtcIce) ProtoMessage()
func (*WebRtcIce) UnmarshalJSON ¶ added in v0.29.0
UnmarshalJSON unmarshals the WebRtcIce from JSON.
func (*WebRtcIce) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcIce) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the WebRtcIce message from JSON.
func (*WebRtcIce) UnmarshalVT ¶
type WebRtcSdp ¶
type WebRtcSdp struct { // TxSeqno is the sequence number of the transmitting peer. // The receiver should update the local seqno to match. TxSeqno uint64 `protobuf:"varint,1,opt,name=tx_seqno,json=txSeqno,proto3" json:"txSeqno,omitempty"` // SdpType is the string encoded type of the sdp. // Examples: "offer" "answer" SdpType string `protobuf:"bytes,2,opt,name=sdp_type,json=sdpType,proto3" json:"sdpType,omitempty"` // Sdp contains the WebRTC session description. Sdp string `protobuf:"bytes,3,opt,name=sdp,proto3" json:"sdp,omitempty"` // contains filtered or unexported fields }
WebRtcSdp contains the SDP offer or answer.
func NewWebRtcSdp ¶
NewWebRtcSdp constructs a new WebRtcSdp from a SessionDescription.
func (*WebRtcSdp) CloneMessageVT ¶
func (m *WebRtcSdp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*WebRtcSdp) EqualMessageVT ¶
func (*WebRtcSdp) GetSdpType ¶
func (*WebRtcSdp) GetTxSeqno ¶
func (*WebRtcSdp) MarshalJSON ¶ added in v0.29.0
MarshalJSON marshals the WebRtcSdp to JSON.
func (*WebRtcSdp) MarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcSdp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the WebRtcSdp message to JSON.
func (*WebRtcSdp) MarshalProtoText ¶ added in v0.29.2
func (*WebRtcSdp) MarshalToSizedBufferVT ¶
func (*WebRtcSdp) ParseSDP ¶
ParseSDP parses the SDP from the type and sdp fields.
Returns nil, nil if the message is empty.
func (*WebRtcSdp) ParseSDPType ¶
func (s *WebRtcSdp) ParseSDPType() webrtc.SDPType
ParseSDPType parses the SDP type field.
func (*WebRtcSdp) ProtoMessage ¶
func (*WebRtcSdp) ProtoMessage()
func (*WebRtcSdp) ToSessionDescription ¶
func (s *WebRtcSdp) ToSessionDescription() *webrtc.SessionDescription
ToSessionDescription converts the sdp into a webrtc session description object.
Returns nil if the message is empty.
func (*WebRtcSdp) UnmarshalJSON ¶ added in v0.29.0
UnmarshalJSON unmarshals the WebRtcSdp from JSON.
func (*WebRtcSdp) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcSdp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the WebRtcSdp message from JSON.
func (*WebRtcSdp) UnmarshalVT ¶
type WebRtcSignal ¶
type WebRtcSignal struct { // Body is the body of the message. // // Types that are assignable to Body: // // *WebRtcSignal_RequestOffer // *WebRtcSignal_Sdp // *WebRtcSignal_Ice Body isWebRtcSignal_Body `protobuf_oneof:"body"` // contains filtered or unexported fields }
WebRtcSignal is a WebRTC Signaling message sent via the Signaling channel.
func DecodeWebRtcSignal ¶
func DecodeWebRtcSignal(msg []byte, privKey crypto.PrivKey) (*WebRtcSignal, error)
DecodeWebRtcSignal decrypts and unmarshals the WebRtcSignal message.
func (*WebRtcSignal) CloneMessageVT ¶
func (m *WebRtcSignal) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*WebRtcSignal) CloneVT ¶
func (m *WebRtcSignal) CloneVT() *WebRtcSignal
func (*WebRtcSignal) EqualMessageVT ¶
func (this *WebRtcSignal) EqualMessageVT(thatMsg any) bool
func (*WebRtcSignal) EqualVT ¶
func (this *WebRtcSignal) EqualVT(that *WebRtcSignal) bool
func (*WebRtcSignal) GetBody ¶
func (m *WebRtcSignal) GetBody() isWebRtcSignal_Body
func (*WebRtcSignal) GetIce ¶
func (x *WebRtcSignal) GetIce() *WebRtcIce
func (*WebRtcSignal) GetRequestOffer ¶
func (x *WebRtcSignal) GetRequestOffer() uint64
func (*WebRtcSignal) GetSdp ¶
func (x *WebRtcSignal) GetSdp() *WebRtcSdp
func (*WebRtcSignal) MarshalJSON ¶ added in v0.29.0
func (x *WebRtcSignal) MarshalJSON() ([]byte, error)
MarshalJSON marshals the WebRtcSignal to JSON.
func (*WebRtcSignal) MarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcSignal) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the WebRtcSignal message to JSON.
func (*WebRtcSignal) MarshalProtoText ¶ added in v0.29.2
func (x *WebRtcSignal) MarshalProtoText() string
func (*WebRtcSignal) MarshalToSizedBufferVT ¶
func (m *WebRtcSignal) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*WebRtcSignal) MarshalToVT ¶
func (m *WebRtcSignal) MarshalToVT(dAtA []byte) (int, error)
func (*WebRtcSignal) MarshalVT ¶
func (m *WebRtcSignal) MarshalVT() (dAtA []byte, err error)
func (*WebRtcSignal) ProtoMessage ¶
func (*WebRtcSignal) ProtoMessage()
func (*WebRtcSignal) Reset ¶
func (x *WebRtcSignal) Reset()
func (*WebRtcSignal) SizeVT ¶
func (m *WebRtcSignal) SizeVT() (n int)
func (*WebRtcSignal) String ¶
func (x *WebRtcSignal) String() string
func (*WebRtcSignal) UnmarshalJSON ¶ added in v0.29.0
func (x *WebRtcSignal) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the WebRtcSignal from JSON.
func (*WebRtcSignal) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *WebRtcSignal) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the WebRtcSignal message from JSON.
func (*WebRtcSignal) UnmarshalVT ¶
func (m *WebRtcSignal) UnmarshalVT(dAtA []byte) error
func (*WebRtcSignal) Validate ¶
func (m *WebRtcSignal) Validate() error
Validate validates the WebRtcSignal message.
type WebRtcSignal_Ice ¶
type WebRtcSignal_Ice struct { // Ice contains an ICE candidate. Ice *WebRtcIce `protobuf:"bytes,3,opt,name=ice,proto3,oneof"` }
func (*WebRtcSignal_Ice) CloneVT ¶
func (m *WebRtcSignal_Ice) CloneVT() *WebRtcSignal_Ice
func (*WebRtcSignal_Ice) EqualVT ¶
func (this *WebRtcSignal_Ice) EqualVT(thatIface isWebRtcSignal_Body) bool
func (*WebRtcSignal_Ice) MarshalToSizedBufferVT ¶
func (m *WebRtcSignal_Ice) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*WebRtcSignal_Ice) MarshalToVT ¶
func (m *WebRtcSignal_Ice) MarshalToVT(dAtA []byte) (int, error)
func (*WebRtcSignal_Ice) SizeVT ¶
func (m *WebRtcSignal_Ice) SizeVT() (n int)
type WebRtcSignal_RequestOffer ¶
type WebRtcSignal_RequestOffer struct { // RequestOffer requests a new offer from the offerer with the local session seqno. // Incremented when negotiation is needed (something changes about the session). RequestOffer uint64 `protobuf:"varint,1,opt,name=request_offer,json=requestOffer,proto3,oneof"` }
func (*WebRtcSignal_RequestOffer) CloneVT ¶
func (m *WebRtcSignal_RequestOffer) CloneVT() *WebRtcSignal_RequestOffer
func (*WebRtcSignal_RequestOffer) EqualVT ¶
func (this *WebRtcSignal_RequestOffer) EqualVT(thatIface isWebRtcSignal_Body) bool
func (*WebRtcSignal_RequestOffer) MarshalToSizedBufferVT ¶
func (m *WebRtcSignal_RequestOffer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*WebRtcSignal_RequestOffer) MarshalToVT ¶
func (m *WebRtcSignal_RequestOffer) MarshalToVT(dAtA []byte) (int, error)
func (*WebRtcSignal_RequestOffer) SizeVT ¶
func (m *WebRtcSignal_RequestOffer) SizeVT() (n int)
type WebRtcSignal_Sdp ¶
type WebRtcSignal_Sdp struct { // Sdp contains the sdp offer or answer. Sdp *WebRtcSdp `protobuf:"bytes,2,opt,name=sdp,proto3,oneof"` }
func (*WebRtcSignal_Sdp) CloneVT ¶
func (m *WebRtcSignal_Sdp) CloneVT() *WebRtcSignal_Sdp
func (*WebRtcSignal_Sdp) EqualVT ¶
func (this *WebRtcSignal_Sdp) EqualVT(thatIface isWebRtcSignal_Body) bool
func (*WebRtcSignal_Sdp) MarshalToSizedBufferVT ¶
func (m *WebRtcSignal_Sdp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*WebRtcSignal_Sdp) MarshalToVT ¶
func (m *WebRtcSignal_Sdp) MarshalToVT(dAtA []byte) (int, error)
func (*WebRtcSignal_Sdp) SizeVT ¶
func (m *WebRtcSignal_Sdp) SizeVT() (n int)