Documentation ¶
Index ¶
- Constants
- Variables
- 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 (c *Config) GetConfigID() string
- func (c *Config) GetDebugVals() config.DebugValues
- func (x *Config) GetServer() *server.Config
- 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 (*Config) ProtoMessage()
- func (x *Config) Reset()
- 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 Controller
- 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 Server
Constants ¶
const ConfigID = ControllerID
ConfigID is the string used to identify this config object.
const ControllerID = "bifrost/signaling/rpc/server"
ControllerID is the ID of the controller.
Variables ¶
var Version = semver.MustParse("0.0.1")
Version is the version of the controller implementation.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Server configures the peer ids and protocol ids to listen on. Server *server.Config `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` // contains filtered or unexported fields }
Config is the configuration for the Signaling RPC server.
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) 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) 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) ProtoMessage ¶
func (*Config) ProtoMessage()
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 Controller ¶
type Controller struct { *stream_srpc_server.Server // contains filtered or unexported fields }
Controller is the signaling server controller.
func NewController ¶
NewController constructs a new signaling server controller.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory constructs a WebSocket 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 ¶
func (t *Factory) GetVersion() semver.Version
GetVersion returns the version of this controller.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the signaling service server.
This server expects to be used with Bifrost authenticated streams. Each incoming stream context should have a MountedStreamContext. To override this value use NewServerWithIdentity.
func NewServerWithIdentify ¶
func NewServerWithIdentify(le *logrus.Entry, ident func(ctx context.Context) (peer.ID, error)) *Server
NewServerWithIdentify constructs a new server that identifies the remote peer corresponding with the stream context via a custom callback function.
func (*Server) Listen ¶
func (s *Server) Listen(req *signaling.ListenRequest, strm signaling.SRPCSignaling_ListenStream) error
Listen watches the list of ongoing sessions with the peer.