Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (m *Config) CloneMessageVT() proto.Message
- func (m *Config) CloneVT() *Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (this *Config) EqualMessageVT(thatMsg proto.Message) 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 (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) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type Controller
- type Factory
- 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 File_github_com_aperturerobotics_bifrost_signaling_rpc_server_server_proto protoreflect.FileDescriptor
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 (*Config) Descriptor
deprecated
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) MarshalToSizedBufferVT ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
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( 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 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.