mirror of
https://github.com/livekit/livekit.git
synced 2026-05-25 09:54:41 +00:00
Converted RTC back to GRPC for server push capability
This commit is contained in:
@@ -15,7 +15,11 @@ server: generate
|
||||
}
|
||||
|
||||
generate: wire
|
||||
$(WIRE)
|
||||
@{ \
|
||||
echo "wiring" ;\
|
||||
cd cmd/server ;\
|
||||
$(WIRE) ;\
|
||||
}
|
||||
|
||||
GO_TARGET=proto/livekit
|
||||
proto: protoc protoc-gen-go twirp-gen
|
||||
@@ -26,7 +30,13 @@ proto: protoc protoc-gen-go twirp-gen
|
||||
--twirp_opt=paths=source_relative \
|
||||
--plugin=$(PROTOC_GEN_GO) \
|
||||
-I=proto \
|
||||
proto/*.proto ;\
|
||||
proto/room.proto proto/model.proto ;\
|
||||
protoc --go_out=$(GO_TARGET) --go-grpc_out=$(GO_TARGET) \
|
||||
--go_opt=paths=source_relative \
|
||||
--go-grpc_opt=paths=source_relative \
|
||||
--plugin=$(PROTOC_GEN_GO) \
|
||||
-I=proto \
|
||||
proto/rtc.proto ;\
|
||||
}
|
||||
|
||||
protoc:
|
||||
|
||||
+18
-15
@@ -14,9 +14,12 @@ import (
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/negroni"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/node"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/livekit-server/proto/livekit"
|
||||
)
|
||||
@@ -75,9 +78,9 @@ func startServer(c *cli.Context) error {
|
||||
type LivekitServer struct {
|
||||
config *config.Config
|
||||
roomServer livekit.TwirpServer
|
||||
rtcServer livekit.TwirpServer
|
||||
rtcServer livekit.RTCServiceServer
|
||||
roomHttp *http.Server
|
||||
rtcHttp *http.Server
|
||||
rtcGrpc *grpc.Server
|
||||
running bool
|
||||
doneChan chan bool
|
||||
}
|
||||
@@ -88,7 +91,7 @@ func NewLivekitServer(conf *config.Config,
|
||||
s = &LivekitServer{
|
||||
config: conf,
|
||||
roomServer: livekit.NewRoomServiceServer(roomService),
|
||||
rtcServer: livekit.NewRTCServiceServer(rtcService),
|
||||
rtcServer: rtcService,
|
||||
}
|
||||
|
||||
roomHandler := configureMiddlewares(conf, s.roomServer)
|
||||
@@ -97,14 +100,8 @@ func NewLivekitServer(conf *config.Config,
|
||||
Handler: roomHandler,
|
||||
}
|
||||
|
||||
rtcMux := http.NewServeMux()
|
||||
rtcMux.Handle(livekit.RTCServicePathPrefix, s.rtcServer)
|
||||
rtcMux.HandleFunc("/rtc/Signal", rtcService.Signal)
|
||||
rtcHandler := configureMiddlewares(conf, rtcMux)
|
||||
s.rtcHttp = &http.Server{
|
||||
Addr: fmt.Sprintf(":%d", conf.RTCPort),
|
||||
Handler: rtcHandler,
|
||||
}
|
||||
s.rtcGrpc = grpc.NewServer()
|
||||
livekit.RegisterRTCServiceServer(s.rtcGrpc, s.rtcServer)
|
||||
|
||||
return
|
||||
}
|
||||
@@ -121,7 +118,9 @@ func (s *LivekitServer) Start() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rtcLn, err := net.Listen("tcp", s.rtcHttp.Addr)
|
||||
|
||||
rtcAddr := fmt.Sprintf(":%d", s.config.RTCPort)
|
||||
rtcLn, err := net.Listen("tcp", rtcAddr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -131,8 +130,8 @@ func (s *LivekitServer) Start() error {
|
||||
s.roomHttp.Serve(roomLn)
|
||||
}()
|
||||
go func() {
|
||||
logger.GetLogger().Infow("starting RTC service", "address", s.rtcHttp.Addr)
|
||||
s.rtcHttp.Serve(rtcLn)
|
||||
logger.GetLogger().Infow("starting RTC service", "address", rtcAddr)
|
||||
s.rtcGrpc.Serve(rtcLn)
|
||||
}()
|
||||
|
||||
<-s.doneChan
|
||||
@@ -143,7 +142,7 @@ func (s *LivekitServer) Start() error {
|
||||
wg.Add(2)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
s.rtcHttp.Shutdown(ctx)
|
||||
s.rtcGrpc.GracefulStop()
|
||||
}()
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
@@ -166,3 +165,7 @@ func configureMiddlewares(conf *config.Config, handler http.Handler) *negroni.Ne
|
||||
n.UseHandler(handler)
|
||||
return n
|
||||
}
|
||||
|
||||
func newManager(conf *config.Config, localNode *node.Node) (*rtc.RoomManager, error) {
|
||||
return rtc.NewRoomManager(conf.RTC, localNode.Ip)
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ func InitializeServer(conf *config.Config) (*LivekitServer, error) {
|
||||
NewLivekitServer,
|
||||
node.NodeSet,
|
||||
service.ServiceSet,
|
||||
newManager,
|
||||
)
|
||||
return &LivekitServer{}, nil
|
||||
}
|
||||
|
||||
@@ -18,11 +18,15 @@ func InitializeServer(conf *config.Config) (*LivekitServer, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
roomService, err := service.NewRoomService(conf, nodeNode)
|
||||
roomManager, err := newManager(conf, nodeNode)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rtcService := service.NewRTCService()
|
||||
roomService, err := service.NewRoomService(conf, roomManager, nodeNode)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rtcService := service.NewRTCService(roomManager)
|
||||
livekitServer, err := NewLivekitServer(conf, roomService, rtcService)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -18,5 +18,6 @@ require (
|
||||
github.com/urfave/cli/v2 v2.2.0
|
||||
github.com/urfave/negroni v1.0.0
|
||||
go.uber.org/zap v1.16.0
|
||||
google.golang.org/grpc v1.33.1
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
)
|
||||
|
||||
@@ -531,6 +531,7 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2El
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
|
||||
@@ -542,6 +543,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
package data
|
||||
|
||||
@@ -56,7 +56,3 @@ func (m *RoomManager) DeleteRoom(roomId string) error {
|
||||
delete(m.rooms, roomId)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *RoomManager) NewWebRTCPeer(me MediaEngine) (*WebRTCPeer, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
+9
-19
@@ -1,31 +1,21 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/proto/livekit"
|
||||
)
|
||||
|
||||
type RTCService struct {
|
||||
livekit.UnimplementedRTCServiceServer
|
||||
manager *rtc.RoomManager
|
||||
}
|
||||
|
||||
func (s *RTCService) Join(ctx context.Context, req *livekit.JoinRequest) (res *livekit.JoinResponse, err error) {
|
||||
return
|
||||
func (s *RTCService) Signal(stream livekit.RTCService_SignalServer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *RTCService) Offer(ctx context.Context, offer *livekit.SessionDescription) (answer *livekit.SessionDescription, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (s *RTCService) Trickle(ctx context.Context, req *livekit.TrickleRequest) (res *livekit.TrickleResponse, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (s *RTCService) Signal(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func NewRTCService() *RTCService {
|
||||
return &RTCService{}
|
||||
func NewRTCService(manager *rtc.RoomManager) *RTCService {
|
||||
return &RTCService{
|
||||
manager: manager,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/node"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/proto/livekit"
|
||||
)
|
||||
|
||||
@@ -15,10 +16,10 @@ var ServiceSet = wire.NewSet(
|
||||
NewRTCService,
|
||||
)
|
||||
|
||||
func NewRoomService(conf *config.Config, localNode *node.Node) (livekit.RoomService, error) {
|
||||
func NewRoomService(conf *config.Config, manager *rtc.RoomManager, localNode *node.Node) (livekit.RoomService, error) {
|
||||
if conf.MultiNode {
|
||||
return nil, fmt.Errorf("multinode is not supported")
|
||||
} else {
|
||||
return NewSimpleRoomService(conf, localNode)
|
||||
return NewSimpleRoomService(manager, localNode)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
|
||||
"github.com/twitchtv/twirp"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/node"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/proto/livekit"
|
||||
@@ -18,12 +17,7 @@ type SimpleRoomService struct {
|
||||
manager *rtc.RoomManager
|
||||
}
|
||||
|
||||
func NewSimpleRoomService(conf *config.Config, localNode *node.Node) (svc *SimpleRoomService, err error) {
|
||||
manager, err := rtc.NewRoomManager(conf.RTC, localNode.Ip)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
func NewSimpleRoomService(manager *rtc.RoomManager, localNode *node.Node) (svc *SimpleRoomService, err error) {
|
||||
svc = &SimpleRoomService{
|
||||
localNode: localNode,
|
||||
manager: manager,
|
||||
|
||||
+23
-22
@@ -258,26 +258,27 @@ func init() {
|
||||
func init() { proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) }
|
||||
|
||||
var fileDescriptor_4c16552f9fdb66d8 = []byte{
|
||||
// 327 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xcd, 0x6a, 0xeb, 0x30,
|
||||
0x10, 0x85, 0x71, 0x12, 0xc7, 0xf1, 0x38, 0xb9, 0xf7, 0x22, 0x2e, 0xd4, 0xa5, 0x94, 0x06, 0x77,
|
||||
0xe3, 0x6e, 0xb2, 0x68, 0xdf, 0xa0, 0x29, 0x85, 0x6c, 0x4a, 0x50, 0xbb, 0xea, 0xc6, 0xa8, 0x96,
|
||||
0xa0, 0x22, 0xd6, 0x0f, 0xd2, 0xb8, 0x24, 0xaf, 0xd4, 0xa7, 0x2c, 0x92, 0x93, 0xd0, 0xe5, 0xf9,
|
||||
0x24, 0xbe, 0x39, 0xc3, 0x40, 0xa1, 0x0c, 0x17, 0xdd, 0xca, 0x3a, 0x83, 0x86, 0x64, 0x9d, 0xfc,
|
||||
0x12, 0x3b, 0x89, 0xd5, 0x0e, 0x26, 0x2f, 0x86, 0x0b, 0xf2, 0x07, 0x46, 0x92, 0x97, 0xc9, 0x32,
|
||||
0xa9, 0x73, 0x3a, 0x92, 0x3c, 0x66, 0x5b, 0x8e, 0x8e, 0xd9, 0x92, 0x4b, 0x98, 0x39, 0x6c, 0x1b,
|
||||
0x6b, 0x1c, 0x96, 0xe3, 0x65, 0x52, 0x2f, 0x68, 0xe6, 0xb0, 0xdd, 0x1a, 0x87, 0xa4, 0x86, 0xd4,
|
||||
0x23, 0x43, 0x5f, 0x4e, 0x96, 0x49, 0x5d, 0xdc, 0x93, 0xd5, 0xd1, 0xbd, 0x0a, 0xe2, 0xd7, 0xf0,
|
||||
0x42, 0x87, 0x0f, 0xd5, 0x06, 0xf2, 0x33, 0x23, 0x57, 0x90, 0xeb, 0x5e, 0x35, 0xce, 0x18, 0xe5,
|
||||
0xe3, 0xe0, 0x94, 0xce, 0x74, 0xaf, 0x68, 0xc8, 0xe4, 0x06, 0x8a, 0xf0, 0xd8, 0x76, 0x52, 0x68,
|
||||
0xf4, 0xb1, 0x47, 0x4a, 0x41, 0xf7, 0x6a, 0x3d, 0x90, 0xea, 0x3b, 0x81, 0x49, 0xf8, 0x4a, 0x2e,
|
||||
0x20, 0x0b, 0x8a, 0xe6, 0xdc, 0x7e, 0x1a, 0xe2, 0x86, 0x93, 0x5b, 0x58, 0x08, 0x65, 0xf1, 0xd0,
|
||||
0xa0, 0x54, 0xc2, 0xf4, 0x18, 0x25, 0x0b, 0x3a, 0x8f, 0xf0, 0x6d, 0x60, 0xe4, 0x0e, 0xfe, 0x29,
|
||||
0xb6, 0x6f, 0x2c, 0x73, 0x28, 0x5b, 0x69, 0x59, 0x18, 0x36, 0xac, 0xf7, 0x57, 0xb1, 0xfd, 0xf6,
|
||||
0x17, 0x0e, 0xbe, 0xd6, 0x09, 0x86, 0xd2, 0xe8, 0xa8, 0x8c, 0xeb, 0x8e, 0xe9, 0xfc, 0x04, 0x83,
|
||||
0x92, 0xfc, 0x87, 0x14, 0xcd, 0x4e, 0xe8, 0x32, 0x8d, 0x5d, 0x86, 0x50, 0x3d, 0x43, 0xf1, 0xc4,
|
||||
0x90, 0xad, 0x3f, 0x99, 0xd6, 0xa2, 0x23, 0xd7, 0x00, 0x5e, 0x78, 0x1f, 0x44, 0xe7, 0xd6, 0xf9,
|
||||
0x91, 0x6c, 0x38, 0x29, 0x21, 0xb3, 0xec, 0xd0, 0x19, 0xc6, 0x63, 0xe5, 0x39, 0x3d, 0xc5, 0xc7,
|
||||
0xfc, 0xfd, 0x74, 0xb7, 0x8f, 0x69, 0xbc, 0xe3, 0xc3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
|
||||
0xc9, 0x32, 0xc0, 0xd6, 0x01, 0x00, 0x00,
|
||||
// 349 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x5f, 0xcb, 0xd3, 0x30,
|
||||
0x14, 0xc6, 0xe9, 0xb6, 0xae, 0xeb, 0xe9, 0xa6, 0x12, 0x04, 0x2b, 0x22, 0x8e, 0x7a, 0x53, 0x2f,
|
||||
0xec, 0x50, 0xbf, 0x81, 0x13, 0x61, 0x37, 0x32, 0xa2, 0x57, 0xde, 0x94, 0xac, 0x0d, 0x2e, 0xac,
|
||||
0xf9, 0x43, 0x72, 0x3a, 0xb6, 0xaf, 0xe4, 0xa7, 0x7c, 0x49, 0xda, 0x8e, 0xf7, 0xaa, 0x3c, 0xbf,
|
||||
0x84, 0xdf, 0x79, 0x4e, 0x03, 0x99, 0xd4, 0x2d, 0xef, 0x2a, 0x63, 0x35, 0x6a, 0x92, 0x74, 0xe2,
|
||||
0xca, 0x2f, 0x02, 0x8b, 0x0b, 0x2c, 0x7e, 0xe9, 0x96, 0x93, 0x17, 0x30, 0x13, 0x6d, 0x1e, 0x6d,
|
||||
0xa3, 0x32, 0xa5, 0x33, 0xd1, 0x86, 0x6c, 0xf2, 0xd9, 0x98, 0x0d, 0x79, 0x0b, 0x2b, 0x8b, 0x4d,
|
||||
0x6d, 0xb4, 0xc5, 0x7c, 0xbe, 0x8d, 0xca, 0x0d, 0x4d, 0x2c, 0x36, 0x47, 0x6d, 0x91, 0x94, 0x10,
|
||||
0x3b, 0x64, 0xe8, 0xf2, 0xc5, 0x36, 0x2a, 0xb3, 0xaf, 0xa4, 0x1a, 0xdd, 0x95, 0x17, 0xff, 0xf6,
|
||||
0x27, 0x74, 0xb8, 0x50, 0x1c, 0x20, 0x7d, 0x30, 0xf2, 0x0e, 0x52, 0xd5, 0xcb, 0xda, 0x6a, 0x2d,
|
||||
0x5d, 0x18, 0x1c, 0xd3, 0x95, 0xea, 0x25, 0xf5, 0x99, 0x7c, 0x80, 0xcc, 0x1f, 0x36, 0x9d, 0xe0,
|
||||
0x0a, 0x5d, 0xe8, 0x11, 0x53, 0x50, 0xbd, 0xdc, 0x0f, 0xa4, 0xf8, 0x1f, 0xc1, 0xc2, 0x5f, 0x25,
|
||||
0x6f, 0x20, 0xf1, 0x8a, 0xfa, 0xd1, 0x7e, 0xe9, 0xe3, 0xa1, 0x25, 0x1f, 0x61, 0xc3, 0xa5, 0xc1,
|
||||
0x7b, 0x8d, 0x42, 0x72, 0xdd, 0x63, 0x90, 0x6c, 0xe8, 0x3a, 0xc0, 0x3f, 0x03, 0x23, 0x9f, 0xe0,
|
||||
0x95, 0x64, 0xb7, 0xda, 0x30, 0x8b, 0xa2, 0x11, 0x86, 0xf9, 0x61, 0xc3, 0x7a, 0x2f, 0x25, 0xbb,
|
||||
0x1d, 0x9f, 0x61, 0xef, 0x6b, 0x2c, 0x67, 0x28, 0xb4, 0x0a, 0xca, 0xb0, 0xee, 0x9c, 0xae, 0x27,
|
||||
0xe8, 0x95, 0xe4, 0x35, 0xc4, 0xa8, 0x2f, 0x5c, 0xe5, 0x71, 0xe8, 0x32, 0x84, 0xe2, 0x27, 0x64,
|
||||
0x3f, 0x18, 0xb2, 0xfd, 0x99, 0x29, 0xc5, 0x3b, 0xf2, 0x1e, 0xc0, 0x71, 0xe7, 0xbc, 0xe8, 0xd1,
|
||||
0x3a, 0x1d, 0xc9, 0xa1, 0x25, 0x39, 0x24, 0x86, 0xdd, 0x3b, 0xcd, 0xda, 0x50, 0x79, 0x4d, 0xa7,
|
||||
0xf8, 0xfd, 0xcb, 0xdf, 0xdd, 0x3f, 0x81, 0xe7, 0xfe, 0x54, 0x35, 0x5a, 0xee, 0xc6, 0xdf, 0x3c,
|
||||
0x7d, 0x3f, 0x3b, 0x6e, 0xaf, 0xdc, 0xee, 0xc2, 0x03, 0x4f, 0xf0, 0xb4, 0x0c, 0xf1, 0xdb, 0x53,
|
||||
0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x7e, 0x05, 0x01, 0xfe, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: room.proto
|
||||
|
||||
package livekit
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CreateRoomRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
// number of seconds the room should cleanup after being empty
|
||||
EmptyTimeout uint32 `protobuf:"varint,2,opt,name=empty_timeout,json=emptyTimeout,proto3" json:"empty_timeout,omitempty"`
|
||||
MaxParticipants uint32 `protobuf:"varint,3,opt,name=max_participants,json=maxParticipants,proto3" json:"max_participants,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) Reset() { *m = CreateRoomRequest{} }
|
||||
func (m *CreateRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateRoomRequest) ProtoMessage() {}
|
||||
func (*CreateRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c5fd27dd97284ef4, []int{0}
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CreateRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CreateRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_CreateRoomRequest.Size(m)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CreateRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CreateRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *CreateRoomRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) GetEmptyTimeout() uint32 {
|
||||
if m != nil {
|
||||
return m.EmptyTimeout
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) GetMaxParticipants() uint32 {
|
||||
if m != nil {
|
||||
return m.MaxParticipants
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetRoomRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetRoomRequest) Reset() { *m = GetRoomRequest{} }
|
||||
func (m *GetRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetRoomRequest) ProtoMessage() {}
|
||||
func (*GetRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c5fd27dd97284ef4, []int{1}
|
||||
}
|
||||
|
||||
func (m *GetRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_GetRoomRequest.Size(m)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *GetRoomRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RoomInfo struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
NodeIp string `protobuf:"bytes,2,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty"`
|
||||
NodeRtcPort uint32 `protobuf:"varint,3,opt,name=node_rtc_port,json=nodeRtcPort,proto3" json:"node_rtc_port,omitempty"`
|
||||
CreationTime int64 `protobuf:"varint,4,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"`
|
||||
Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RoomInfo) Reset() { *m = RoomInfo{} }
|
||||
func (m *RoomInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*RoomInfo) ProtoMessage() {}
|
||||
func (*RoomInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c5fd27dd97284ef4, []int{2}
|
||||
}
|
||||
|
||||
func (m *RoomInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RoomInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RoomInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RoomInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RoomInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RoomInfo.Merge(m, src)
|
||||
}
|
||||
func (m *RoomInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_RoomInfo.Size(m)
|
||||
}
|
||||
func (m *RoomInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RoomInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RoomInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *RoomInfo) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetNodeIp() string {
|
||||
if m != nil {
|
||||
return m.NodeIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetNodeRtcPort() uint32 {
|
||||
if m != nil {
|
||||
return m.NodeRtcPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetCreationTime() int64 {
|
||||
if m != nil {
|
||||
return m.CreationTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteRoomRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DeleteRoomRequest) Reset() { *m = DeleteRoomRequest{} }
|
||||
func (m *DeleteRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRoomRequest) ProtoMessage() {}
|
||||
func (*DeleteRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c5fd27dd97284ef4, []int{3}
|
||||
}
|
||||
|
||||
func (m *DeleteRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DeleteRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Size(m)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DeleteRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DeleteRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *DeleteRoomRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteRoomResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DeleteRoomResponse) Reset() { *m = DeleteRoomResponse{} }
|
||||
func (m *DeleteRoomResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRoomResponse) ProtoMessage() {}
|
||||
func (*DeleteRoomResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c5fd27dd97284ef4, []int{4}
|
||||
}
|
||||
|
||||
func (m *DeleteRoomResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DeleteRoomResponse.Merge(m, src)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Size(m)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DeleteRoomResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DeleteRoomResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CreateRoomRequest)(nil), "livekit.CreateRoomRequest")
|
||||
proto.RegisterType((*GetRoomRequest)(nil), "livekit.GetRoomRequest")
|
||||
proto.RegisterType((*RoomInfo)(nil), "livekit.RoomInfo")
|
||||
proto.RegisterType((*DeleteRoomRequest)(nil), "livekit.DeleteRoomRequest")
|
||||
proto.RegisterType((*DeleteRoomResponse)(nil), "livekit.DeleteRoomResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("room.proto", fileDescriptor_c5fd27dd97284ef4) }
|
||||
|
||||
var fileDescriptor_c5fd27dd97284ef4 = []byte{
|
||||
// 360 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0x6f, 0xda, 0x40,
|
||||
0x10, 0x95, 0x4b, 0xc1, 0x65, 0x80, 0xb6, 0xac, 0x90, 0xb0, 0xe8, 0x05, 0xb9, 0x17, 0x90, 0x5a,
|
||||
0xa3, 0x36, 0xca, 0x29, 0xb7, 0x7c, 0x28, 0xe2, 0x86, 0x9c, 0x9c, 0x72, 0xb1, 0x8c, 0x99, 0x24,
|
||||
0x2b, 0xb0, 0x67, 0xb3, 0x1e, 0x10, 0x91, 0xf2, 0x4f, 0xf2, 0x87, 0xf2, 0xb3, 0xa2, 0x5d, 0xcc,
|
||||
0x47, 0x04, 0x91, 0x38, 0x59, 0xf3, 0xde, 0xb3, 0xe7, 0xbd, 0x37, 0x06, 0xd0, 0x44, 0x69, 0xa0,
|
||||
0x34, 0x31, 0x09, 0x77, 0x26, 0x17, 0x38, 0x95, 0xec, 0xbf, 0x40, 0xf3, 0x42, 0x63, 0xcc, 0x18,
|
||||
0x12, 0xa5, 0x21, 0x3e, 0xcd, 0x31, 0x67, 0xd1, 0x06, 0xd7, 0x68, 0x23, 0x39, 0xf1, 0x9c, 0xae,
|
||||
0xd3, 0xab, 0x86, 0x15, 0x33, 0x0e, 0x27, 0xe2, 0x37, 0x34, 0x30, 0x55, 0xfc, 0x1c, 0xb1, 0x4c,
|
||||
0x91, 0xe6, 0xec, 0x7d, 0xe9, 0x3a, 0xbd, 0x46, 0x58, 0xb7, 0xe0, 0xed, 0x0a, 0x13, 0x7d, 0xf8,
|
||||
0x99, 0xc6, 0xcb, 0x48, 0xc5, 0x9a, 0x65, 0x22, 0x55, 0x9c, 0x71, 0xee, 0x95, 0xac, 0xee, 0x47,
|
||||
0x1a, 0x2f, 0x47, 0x3b, 0xb0, 0xdf, 0x87, 0xef, 0xd7, 0xc8, 0xc7, 0xac, 0xf6, 0x5f, 0x1d, 0xf8,
|
||||
0x66, 0x84, 0xc3, 0xec, 0x9e, 0x3e, 0x37, 0xd8, 0x06, 0x37, 0xa3, 0x09, 0x46, 0x52, 0x59, 0x6b,
|
||||
0xd5, 0xb0, 0x62, 0xc6, 0xa1, 0x12, 0x3e, 0x34, 0x2c, 0xa1, 0x39, 0x89, 0x14, 0x69, 0x2e, 0x1c,
|
||||
0xd5, 0x0c, 0x18, 0x72, 0x32, 0x22, 0xcd, 0x26, 0x5d, 0x62, 0xba, 0x90, 0x94, 0xd9, 0x80, 0xde,
|
||||
0xd7, 0xae, 0xd3, 0x2b, 0x85, 0xf5, 0x35, 0x68, 0x02, 0x8a, 0x16, 0x94, 0x99, 0xa6, 0x98, 0x79,
|
||||
0x65, 0xfb, 0xfd, 0xd5, 0xe0, 0xff, 0x81, 0xe6, 0x25, 0xce, 0xf0, 0xb8, 0x1a, 0xfd, 0x16, 0x88,
|
||||
0x5d, 0x75, 0xae, 0x28, 0xcb, 0xf1, 0xff, 0x9b, 0x03, 0x35, 0x03, 0xdc, 0xa0, 0x5e, 0xc8, 0x04,
|
||||
0xc5, 0x19, 0xc0, 0xf6, 0x34, 0xa2, 0x13, 0x14, 0x27, 0x0b, 0xf6, 0xee, 0xd5, 0x69, 0x6e, 0xb8,
|
||||
0x4d, 0x43, 0xa7, 0xe0, 0x16, 0xcd, 0x8a, 0xf6, 0x86, 0xfd, 0xd8, 0xf5, 0xa1, 0xd7, 0xae, 0x00,
|
||||
0xb6, 0xce, 0x76, 0x76, 0xee, 0x85, 0xeb, 0xfc, 0x3a, 0xc8, 0xad, 0xa2, 0x9c, 0xff, 0xbb, 0x1b,
|
||||
0x3c, 0x48, 0x7e, 0x9c, 0x8f, 0x83, 0x84, 0xd2, 0x41, 0x21, 0x5c, 0x3f, 0xff, 0xe6, 0xa8, 0x17,
|
||||
0xa8, 0x07, 0xf6, 0x4f, 0x5c, 0x83, 0xe3, 0x8a, 0x1d, 0x4f, 0xde, 0x03, 0x00, 0x00, 0xff, 0xff,
|
||||
0x88, 0x0b, 0xf0, 0x4d, 0xa6, 0x02, 0x00, 0x00,
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,441 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: rtc.proto
|
||||
|
||||
package livekit
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type SignalRequest struct {
|
||||
// Types that are valid to be assigned to Message:
|
||||
// *SignalRequest_Join
|
||||
// *SignalRequest_Negotiate
|
||||
// *SignalRequest_Trickle
|
||||
Message isSignalRequest_Message `protobuf_oneof:"message"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SignalRequest) Reset() { *m = SignalRequest{} }
|
||||
func (m *SignalRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignalRequest) ProtoMessage() {}
|
||||
func (*SignalRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_85bd91e80f756774, []int{0}
|
||||
}
|
||||
|
||||
func (m *SignalRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignalRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SignalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SignalRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SignalRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SignalRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SignalRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SignalRequest.Size(m)
|
||||
}
|
||||
func (m *SignalRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SignalRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SignalRequest proto.InternalMessageInfo
|
||||
|
||||
type isSignalRequest_Message interface {
|
||||
isSignalRequest_Message()
|
||||
}
|
||||
|
||||
type SignalRequest_Join struct {
|
||||
Join *JoinRequest `protobuf:"bytes,1,opt,name=join,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalRequest_Negotiate struct {
|
||||
Negotiate *SessionDescription `protobuf:"bytes,2,opt,name=negotiate,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalRequest_Trickle struct {
|
||||
Trickle *Trickle `protobuf:"bytes,3,opt,name=trickle,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*SignalRequest_Join) isSignalRequest_Message() {}
|
||||
|
||||
func (*SignalRequest_Negotiate) isSignalRequest_Message() {}
|
||||
|
||||
func (*SignalRequest_Trickle) isSignalRequest_Message() {}
|
||||
|
||||
func (m *SignalRequest) GetMessage() isSignalRequest_Message {
|
||||
if m != nil {
|
||||
return m.Message
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalRequest) GetJoin() *JoinRequest {
|
||||
if x, ok := m.GetMessage().(*SignalRequest_Join); ok {
|
||||
return x.Join
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalRequest) GetNegotiate() *SessionDescription {
|
||||
if x, ok := m.GetMessage().(*SignalRequest_Negotiate); ok {
|
||||
return x.Negotiate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalRequest) GetTrickle() *Trickle {
|
||||
if x, ok := m.GetMessage().(*SignalRequest_Trickle); ok {
|
||||
return x.Trickle
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*SignalRequest) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*SignalRequest_Join)(nil),
|
||||
(*SignalRequest_Negotiate)(nil),
|
||||
(*SignalRequest_Trickle)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
type SignalResponse struct {
|
||||
// Types that are valid to be assigned to Message:
|
||||
// *SignalResponse_Jin
|
||||
// *SignalResponse_Negotiate
|
||||
// *SignalResponse_Trickle
|
||||
Message isSignalResponse_Message `protobuf_oneof:"message"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SignalResponse) Reset() { *m = SignalResponse{} }
|
||||
func (m *SignalResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignalResponse) ProtoMessage() {}
|
||||
func (*SignalResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_85bd91e80f756774, []int{1}
|
||||
}
|
||||
|
||||
func (m *SignalResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignalResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SignalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SignalResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SignalResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SignalResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SignalResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SignalResponse.Size(m)
|
||||
}
|
||||
func (m *SignalResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SignalResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SignalResponse proto.InternalMessageInfo
|
||||
|
||||
type isSignalResponse_Message interface {
|
||||
isSignalResponse_Message()
|
||||
}
|
||||
|
||||
type SignalResponse_Jin struct {
|
||||
Jin *JoinResponse `protobuf:"bytes,1,opt,name=jin,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalResponse_Negotiate struct {
|
||||
Negotiate *SessionDescription `protobuf:"bytes,2,opt,name=negotiate,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalResponse_Trickle struct {
|
||||
Trickle *Trickle `protobuf:"bytes,3,opt,name=trickle,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*SignalResponse_Jin) isSignalResponse_Message() {}
|
||||
|
||||
func (*SignalResponse_Negotiate) isSignalResponse_Message() {}
|
||||
|
||||
func (*SignalResponse_Trickle) isSignalResponse_Message() {}
|
||||
|
||||
func (m *SignalResponse) GetMessage() isSignalResponse_Message {
|
||||
if m != nil {
|
||||
return m.Message
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalResponse) GetJin() *JoinResponse {
|
||||
if x, ok := m.GetMessage().(*SignalResponse_Jin); ok {
|
||||
return x.Jin
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalResponse) GetNegotiate() *SessionDescription {
|
||||
if x, ok := m.GetMessage().(*SignalResponse_Negotiate); ok {
|
||||
return x.Negotiate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalResponse) GetTrickle() *Trickle {
|
||||
if x, ok := m.GetMessage().(*SignalResponse_Trickle); ok {
|
||||
return x.Trickle
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*SignalResponse) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*SignalResponse_Jin)(nil),
|
||||
(*SignalResponse_Negotiate)(nil),
|
||||
(*SignalResponse_Trickle)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
type JoinRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
|
||||
Offer *SessionDescription `protobuf:"bytes,4,opt,name=offer,proto3" json:"offer,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *JoinRequest) Reset() { *m = JoinRequest{} }
|
||||
func (m *JoinRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinRequest) ProtoMessage() {}
|
||||
func (*JoinRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_85bd91e80f756774, []int{2}
|
||||
}
|
||||
|
||||
func (m *JoinRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_JoinRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *JoinRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_JoinRequest.Merge(m, src)
|
||||
}
|
||||
func (m *JoinRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_JoinRequest.Size(m)
|
||||
}
|
||||
func (m *JoinRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_JoinRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_JoinRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *JoinRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRequest) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRequest) GetPeerId() string {
|
||||
if m != nil {
|
||||
return m.PeerId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRequest) GetOffer() *SessionDescription {
|
||||
if m != nil {
|
||||
return m.Offer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type JoinResponse struct {
|
||||
Answer *SessionDescription `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *JoinResponse) Reset() { *m = JoinResponse{} }
|
||||
func (m *JoinResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinResponse) ProtoMessage() {}
|
||||
func (*JoinResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_85bd91e80f756774, []int{3}
|
||||
}
|
||||
|
||||
func (m *JoinResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *JoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_JoinResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *JoinResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_JoinResponse.Merge(m, src)
|
||||
}
|
||||
func (m *JoinResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_JoinResponse.Size(m)
|
||||
}
|
||||
func (m *JoinResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_JoinResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_JoinResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *JoinResponse) GetAnswer() *SessionDescription {
|
||||
if m != nil {
|
||||
return m.Answer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Trickle struct {
|
||||
// serialized JSON structure of candidate init
|
||||
CandidateInit string `protobuf:"bytes,1,opt,name=candidate_init,json=candidateInit,proto3" json:"candidate_init,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Trickle) Reset() { *m = Trickle{} }
|
||||
func (m *Trickle) String() string { return proto.CompactTextString(m) }
|
||||
func (*Trickle) ProtoMessage() {}
|
||||
func (*Trickle) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_85bd91e80f756774, []int{4}
|
||||
}
|
||||
|
||||
func (m *Trickle) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Trickle.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Trickle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Trickle.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Trickle) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Trickle.Merge(m, src)
|
||||
}
|
||||
func (m *Trickle) XXX_Size() int {
|
||||
return xxx_messageInfo_Trickle.Size(m)
|
||||
}
|
||||
func (m *Trickle) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Trickle.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Trickle proto.InternalMessageInfo
|
||||
|
||||
func (m *Trickle) GetCandidateInit() string {
|
||||
if m != nil {
|
||||
return m.CandidateInit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SessionDescription struct {
|
||||
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Sdp string `protobuf:"bytes,2,opt,name=sdp,proto3" json:"sdp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SessionDescription) Reset() { *m = SessionDescription{} }
|
||||
func (m *SessionDescription) String() string { return proto.CompactTextString(m) }
|
||||
func (*SessionDescription) ProtoMessage() {}
|
||||
func (*SessionDescription) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_85bd91e80f756774, []int{5}
|
||||
}
|
||||
|
||||
func (m *SessionDescription) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SessionDescription.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SessionDescription.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SessionDescription.Merge(m, src)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Size() int {
|
||||
return xxx_messageInfo_SessionDescription.Size(m)
|
||||
}
|
||||
func (m *SessionDescription) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SessionDescription.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SessionDescription proto.InternalMessageInfo
|
||||
|
||||
func (m *SessionDescription) GetType() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SessionDescription) GetSdp() string {
|
||||
if m != nil {
|
||||
return m.Sdp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*SignalRequest)(nil), "livekit.SignalRequest")
|
||||
proto.RegisterType((*SignalResponse)(nil), "livekit.SignalResponse")
|
||||
proto.RegisterType((*JoinRequest)(nil), "livekit.JoinRequest")
|
||||
proto.RegisterType((*JoinResponse)(nil), "livekit.JoinResponse")
|
||||
proto.RegisterType((*Trickle)(nil), "livekit.Trickle")
|
||||
proto.RegisterType((*SessionDescription)(nil), "livekit.SessionDescription")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("rtc.proto", fileDescriptor_85bd91e80f756774) }
|
||||
|
||||
var fileDescriptor_85bd91e80f756774 = []byte{
|
||||
// 406 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x93, 0xcf, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x87, 0x63, 0x92, 0xda, 0xf2, 0x94, 0x56, 0xd5, 0xa8, 0x50, 0x0b, 0x2e, 0xc8, 0x12, 0x52,
|
||||
0x41, 0xe0, 0xf4, 0xcf, 0x0d, 0xc4, 0xa5, 0xe5, 0xe0, 0xc0, 0x6d, 0xd3, 0x13, 0x97, 0xca, 0xb5,
|
||||
0xa7, 0x66, 0x9a, 0x64, 0xd7, 0xec, 0x6e, 0x83, 0x78, 0x03, 0x5e, 0x87, 0x37, 0x44, 0x5e, 0xaf,
|
||||
0xdd, 0x88, 0x48, 0x70, 0xe4, 0xe4, 0x9d, 0xd1, 0xf7, 0x5b, 0x7d, 0x33, 0xb6, 0x21, 0xd6, 0xb6,
|
||||
0xcc, 0x1a, 0xad, 0xac, 0xc2, 0x68, 0xc9, 0x6b, 0x5a, 0xb0, 0x4d, 0x7f, 0x05, 0xb0, 0x37, 0xe7,
|
||||
0x5a, 0x16, 0x4b, 0x41, 0xdf, 0xee, 0xc9, 0x58, 0x7c, 0x0d, 0x93, 0x3b, 0xc5, 0x32, 0x09, 0x5e,
|
||||
0x04, 0xc7, 0xbb, 0x67, 0x87, 0x99, 0x27, 0xb3, 0x4f, 0x8a, 0xa5, 0x67, 0xf2, 0x91, 0x70, 0x0c,
|
||||
0xbe, 0x87, 0x58, 0x52, 0xad, 0x2c, 0x17, 0x96, 0x92, 0x47, 0x2e, 0xf0, 0x7c, 0x08, 0xcc, 0xc9,
|
||||
0x18, 0x56, 0xf2, 0x23, 0x99, 0x52, 0x73, 0x63, 0x59, 0xc9, 0x7c, 0x24, 0x1e, 0x78, 0x7c, 0x03,
|
||||
0x91, 0xd5, 0x5c, 0x2e, 0x96, 0x94, 0x8c, 0x5d, 0xf4, 0x60, 0x88, 0x5e, 0x75, 0xfd, 0x7c, 0x24,
|
||||
0x7a, 0xe4, 0x22, 0x86, 0x68, 0x45, 0xc6, 0x14, 0x35, 0xb5, 0xce, 0xfb, 0xbd, 0xb3, 0x69, 0x94,
|
||||
0x34, 0x84, 0xaf, 0x60, 0x7c, 0x37, 0x38, 0x3f, 0xf9, 0xc3, 0xb9, 0x63, 0xf2, 0x91, 0x68, 0x99,
|
||||
0xff, 0xe4, 0xfc, 0x33, 0x80, 0xdd, 0x8d, 0x0d, 0xe2, 0x11, 0x44, 0x5a, 0xa9, 0xd5, 0x35, 0x57,
|
||||
0x4e, 0x3a, 0x16, 0x61, 0x5b, 0xce, 0x2a, 0x3c, 0x84, 0x1d, 0xab, 0x16, 0x24, 0x9d, 0x5a, 0x2c,
|
||||
0xba, 0xa2, 0xc5, 0x1b, 0x22, 0xdd, 0xe2, 0xe3, 0x0e, 0x6f, 0xcb, 0x59, 0x85, 0xa7, 0xb0, 0xa3,
|
||||
0x6e, 0x6f, 0x49, 0x27, 0x93, 0x7f, 0x4e, 0x22, 0x3a, 0x32, 0xbd, 0x84, 0xc7, 0x9b, 0x7b, 0xc1,
|
||||
0x73, 0x08, 0x0b, 0x69, 0xbe, 0x93, 0xf6, 0xeb, 0xfb, 0xeb, 0x1d, 0x1e, 0x4d, 0x4f, 0x20, 0xf2,
|
||||
0x03, 0xe3, 0x4b, 0xd8, 0x2f, 0x0b, 0x59, 0x71, 0x55, 0x58, 0xba, 0x66, 0xc9, 0xd6, 0x4f, 0xb4,
|
||||
0x37, 0x74, 0x67, 0x92, 0x6d, 0xfa, 0x0e, 0x70, 0xfb, 0x3e, 0x44, 0x98, 0xd8, 0x1f, 0x0d, 0xf9,
|
||||
0x88, 0x3b, 0xe3, 0x01, 0x8c, 0x4d, 0xd5, 0xf8, 0x05, 0xb4, 0xc7, 0xb3, 0xcf, 0x00, 0xe2, 0xea,
|
||||
0x72, 0x4e, 0x7a, 0xcd, 0x25, 0xe1, 0x07, 0x08, 0xbb, 0xd7, 0x8f, 0x4f, 0x1f, 0x54, 0x37, 0xbf,
|
||||
0xe1, 0x67, 0x47, 0x5b, 0xfd, 0x6e, 0xd6, 0xe3, 0xe0, 0x24, 0xb8, 0x38, 0xfd, 0x32, 0xad, 0xd9,
|
||||
0x7e, 0xbd, 0xbf, 0xc9, 0x4a, 0xb5, 0x9a, 0x7a, 0xb0, 0x7f, 0xbe, 0x35, 0xa4, 0xd7, 0xa4, 0xa7,
|
||||
0xee, 0x37, 0xe9, 0x9b, 0x37, 0xa1, 0x2b, 0xcf, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x3d,
|
||||
0xb9, 0xb1, 0x42, 0x03, 0x00, 0x00,
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package livekit
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// RTCServiceClient is the client API for RTCService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type RTCServiceClient interface {
|
||||
Signal(ctx context.Context, opts ...grpc.CallOption) (RTCService_SignalClient, error)
|
||||
}
|
||||
|
||||
type rTCServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRTCServiceClient(cc grpc.ClientConnInterface) RTCServiceClient {
|
||||
return &rTCServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *rTCServiceClient) Signal(ctx context.Context, opts ...grpc.CallOption) (RTCService_SignalClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_RTCService_serviceDesc.Streams[0], "/livekit.RTCService/Signal", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &rTCServiceSignalClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type RTCService_SignalClient interface {
|
||||
Send(*SignalRequest) error
|
||||
Recv() (*SignalResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type rTCServiceSignalClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *rTCServiceSignalClient) Send(m *SignalRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *rTCServiceSignalClient) Recv() (*SignalResponse, error) {
|
||||
m := new(SignalResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// RTCServiceServer is the server API for RTCService service.
|
||||
// All implementations must embed UnimplementedRTCServiceServer
|
||||
// for forward compatibility
|
||||
type RTCServiceServer interface {
|
||||
Signal(RTCService_SignalServer) error
|
||||
mustEmbedUnimplementedRTCServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedRTCServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRTCServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRTCServiceServer) Signal(RTCService_SignalServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Signal not implemented")
|
||||
}
|
||||
func (UnimplementedRTCServiceServer) mustEmbedUnimplementedRTCServiceServer() {}
|
||||
|
||||
// UnsafeRTCServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RTCServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRTCServiceServer interface {
|
||||
mustEmbedUnimplementedRTCServiceServer()
|
||||
}
|
||||
|
||||
func RegisterRTCServiceServer(s *grpc.Server, srv RTCServiceServer) {
|
||||
s.RegisterService(&_RTCService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RTCService_Signal_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(RTCServiceServer).Signal(&rTCServiceSignalServer{stream})
|
||||
}
|
||||
|
||||
type RTCService_SignalServer interface {
|
||||
Send(*SignalResponse) error
|
||||
Recv() (*SignalRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type rTCServiceSignalServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *rTCServiceSignalServer) Send(m *SignalResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *rTCServiceSignalServer) Recv() (*SignalRequest, error) {
|
||||
m := new(SignalRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
var _RTCService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "livekit.RTCService",
|
||||
HandlerType: (*RTCServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Signal",
|
||||
Handler: _RTCService_Signal_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "rtc.proto",
|
||||
}
|
||||
@@ -1,528 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: service.proto
|
||||
|
||||
package livekit
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CreateRoomRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
// number of seconds the room should cleanup after being empty
|
||||
EmptyTimeout uint32 `protobuf:"varint,2,opt,name=empty_timeout,json=emptyTimeout,proto3" json:"empty_timeout,omitempty"`
|
||||
MaxParticipants uint32 `protobuf:"varint,3,opt,name=max_participants,json=maxParticipants,proto3" json:"max_participants,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) Reset() { *m = CreateRoomRequest{} }
|
||||
func (m *CreateRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateRoomRequest) ProtoMessage() {}
|
||||
func (*CreateRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{0}
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CreateRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CreateRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_CreateRoomRequest.Size(m)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CreateRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CreateRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *CreateRoomRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) GetEmptyTimeout() uint32 {
|
||||
if m != nil {
|
||||
return m.EmptyTimeout
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) GetMaxParticipants() uint32 {
|
||||
if m != nil {
|
||||
return m.MaxParticipants
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetRoomRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetRoomRequest) Reset() { *m = GetRoomRequest{} }
|
||||
func (m *GetRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetRoomRequest) ProtoMessage() {}
|
||||
func (*GetRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{1}
|
||||
}
|
||||
|
||||
func (m *GetRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_GetRoomRequest.Size(m)
|
||||
}
|
||||
func (m *GetRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *GetRoomRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RoomInfo struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
NodeIp string `protobuf:"bytes,2,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty"`
|
||||
NodeRtcPort uint32 `protobuf:"varint,3,opt,name=node_rtc_port,json=nodeRtcPort,proto3" json:"node_rtc_port,omitempty"`
|
||||
CreationTime int64 `protobuf:"varint,4,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"`
|
||||
Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RoomInfo) Reset() { *m = RoomInfo{} }
|
||||
func (m *RoomInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*RoomInfo) ProtoMessage() {}
|
||||
func (*RoomInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{2}
|
||||
}
|
||||
|
||||
func (m *RoomInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RoomInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RoomInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RoomInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RoomInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RoomInfo.Merge(m, src)
|
||||
}
|
||||
func (m *RoomInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_RoomInfo.Size(m)
|
||||
}
|
||||
func (m *RoomInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RoomInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RoomInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *RoomInfo) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetNodeIp() string {
|
||||
if m != nil {
|
||||
return m.NodeIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetNodeRtcPort() uint32 {
|
||||
if m != nil {
|
||||
return m.NodeRtcPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetCreationTime() int64 {
|
||||
if m != nil {
|
||||
return m.CreationTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RoomInfo) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteRoomRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DeleteRoomRequest) Reset() { *m = DeleteRoomRequest{} }
|
||||
func (m *DeleteRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRoomRequest) ProtoMessage() {}
|
||||
func (*DeleteRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{3}
|
||||
}
|
||||
|
||||
func (m *DeleteRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DeleteRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Size(m)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DeleteRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DeleteRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *DeleteRoomRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteRoomResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DeleteRoomResponse) Reset() { *m = DeleteRoomResponse{} }
|
||||
func (m *DeleteRoomResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRoomResponse) ProtoMessage() {}
|
||||
func (*DeleteRoomResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{4}
|
||||
}
|
||||
|
||||
func (m *DeleteRoomResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DeleteRoomResponse.Merge(m, src)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Size(m)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DeleteRoomResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DeleteRoomResponse proto.InternalMessageInfo
|
||||
|
||||
type JoinRequest struct {
|
||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
|
||||
Offer *SessionDescription `protobuf:"bytes,4,opt,name=offer,proto3" json:"offer,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *JoinRequest) Reset() { *m = JoinRequest{} }
|
||||
func (m *JoinRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinRequest) ProtoMessage() {}
|
||||
func (*JoinRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{5}
|
||||
}
|
||||
|
||||
func (m *JoinRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_JoinRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *JoinRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_JoinRequest.Merge(m, src)
|
||||
}
|
||||
func (m *JoinRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_JoinRequest.Size(m)
|
||||
}
|
||||
func (m *JoinRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_JoinRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_JoinRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *JoinRequest) GetRoomId() string {
|
||||
if m != nil {
|
||||
return m.RoomId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRequest) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRequest) GetPeerId() string {
|
||||
if m != nil {
|
||||
return m.PeerId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRequest) GetOffer() *SessionDescription {
|
||||
if m != nil {
|
||||
return m.Offer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type JoinResponse struct {
|
||||
Answer *SessionDescription `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *JoinResponse) Reset() { *m = JoinResponse{} }
|
||||
func (m *JoinResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinResponse) ProtoMessage() {}
|
||||
func (*JoinResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{6}
|
||||
}
|
||||
|
||||
func (m *JoinResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *JoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_JoinResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *JoinResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_JoinResponse.Merge(m, src)
|
||||
}
|
||||
func (m *JoinResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_JoinResponse.Size(m)
|
||||
}
|
||||
func (m *JoinResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_JoinResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_JoinResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *JoinResponse) GetAnswer() *SessionDescription {
|
||||
if m != nil {
|
||||
return m.Answer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TrickleRequest struct {
|
||||
Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *TrickleRequest) Reset() { *m = TrickleRequest{} }
|
||||
func (m *TrickleRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*TrickleRequest) ProtoMessage() {}
|
||||
func (*TrickleRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{7}
|
||||
}
|
||||
|
||||
func (m *TrickleRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TrickleRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_TrickleRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_TrickleRequest.Merge(m, src)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_TrickleRequest.Size(m)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_TrickleRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_TrickleRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *TrickleRequest) GetCandidate() string {
|
||||
if m != nil {
|
||||
return m.Candidate
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TrickleResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *TrickleResponse) Reset() { *m = TrickleResponse{} }
|
||||
func (m *TrickleResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*TrickleResponse) ProtoMessage() {}
|
||||
func (*TrickleResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{8}
|
||||
}
|
||||
|
||||
func (m *TrickleResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TrickleResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_TrickleResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_TrickleResponse.Merge(m, src)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_TrickleResponse.Size(m)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_TrickleResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_TrickleResponse proto.InternalMessageInfo
|
||||
|
||||
type SessionDescription struct {
|
||||
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Sdp []byte `protobuf:"bytes,2,opt,name=sdp,proto3" json:"sdp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SessionDescription) Reset() { *m = SessionDescription{} }
|
||||
func (m *SessionDescription) String() string { return proto.CompactTextString(m) }
|
||||
func (*SessionDescription) ProtoMessage() {}
|
||||
func (*SessionDescription) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{9}
|
||||
}
|
||||
|
||||
func (m *SessionDescription) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SessionDescription.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SessionDescription.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SessionDescription.Merge(m, src)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Size() int {
|
||||
return xxx_messageInfo_SessionDescription.Size(m)
|
||||
}
|
||||
func (m *SessionDescription) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SessionDescription.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SessionDescription proto.InternalMessageInfo
|
||||
|
||||
func (m *SessionDescription) GetType() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SessionDescription) GetSdp() []byte {
|
||||
if m != nil {
|
||||
return m.Sdp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CreateRoomRequest)(nil), "livekit.CreateRoomRequest")
|
||||
proto.RegisterType((*GetRoomRequest)(nil), "livekit.GetRoomRequest")
|
||||
proto.RegisterType((*RoomInfo)(nil), "livekit.RoomInfo")
|
||||
proto.RegisterType((*DeleteRoomRequest)(nil), "livekit.DeleteRoomRequest")
|
||||
proto.RegisterType((*DeleteRoomResponse)(nil), "livekit.DeleteRoomResponse")
|
||||
proto.RegisterType((*JoinRequest)(nil), "livekit.JoinRequest")
|
||||
proto.RegisterType((*JoinResponse)(nil), "livekit.JoinResponse")
|
||||
proto.RegisterType((*TrickleRequest)(nil), "livekit.TrickleRequest")
|
||||
proto.RegisterType((*TrickleResponse)(nil), "livekit.TrickleResponse")
|
||||
proto.RegisterType((*SessionDescription)(nil), "livekit.SessionDescription")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) }
|
||||
|
||||
var fileDescriptor_a0b84a42fa06f626 = []byte{
|
||||
// 528 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0x95, 0x9b, 0x2f, 0x32, 0x49, 0xda, 0x66, 0x15, 0x14, 0xcb, 0xe5, 0x10, 0x99, 0x4b, 0x2a,
|
||||
0xa1, 0x48, 0x24, 0xe2, 0x02, 0x5c, 0x20, 0x45, 0x28, 0x5c, 0xa8, 0xdc, 0x9c, 0xb8, 0x44, 0xc6,
|
||||
0x9e, 0x48, 0xab, 0xc4, 0xbb, 0xcb, 0xee, 0xb6, 0xb4, 0x12, 0x3f, 0x80, 0xff, 0xc0, 0xbf, 0xe1,
|
||||
0xc4, 0xcf, 0x42, 0xbb, 0x6b, 0x3b, 0x2e, 0x29, 0x6d, 0x6f, 0x9e, 0x99, 0xe7, 0xdd, 0xf7, 0xe6,
|
||||
0x3d, 0x2d, 0xf4, 0x14, 0xca, 0x2b, 0x9a, 0xe0, 0x44, 0x48, 0xae, 0x39, 0x69, 0x6d, 0xe9, 0x15,
|
||||
0x6e, 0xa8, 0x0e, 0x7f, 0x40, 0x7f, 0x2e, 0x31, 0xd6, 0x18, 0x71, 0x9e, 0x45, 0xf8, 0xed, 0x12,
|
||||
0x95, 0x26, 0x43, 0x68, 0x49, 0xce, 0xb3, 0x15, 0x4d, 0x7d, 0x6f, 0xe4, 0x8d, 0xdb, 0x51, 0xd3,
|
||||
0x94, 0x8b, 0x94, 0x3c, 0x87, 0x1e, 0x66, 0x42, 0xdf, 0xac, 0x34, 0xcd, 0x90, 0x5f, 0x6a, 0xff,
|
||||
0x60, 0xe4, 0x8d, 0x7b, 0x51, 0xd7, 0x36, 0x97, 0xae, 0x47, 0x4e, 0xe1, 0x38, 0x8b, 0xaf, 0x57,
|
||||
0x22, 0x96, 0x9a, 0x26, 0x54, 0xc4, 0x4c, 0x2b, 0xbf, 0x66, 0x71, 0x47, 0x59, 0x7c, 0x7d, 0x5e,
|
||||
0x69, 0x87, 0xa7, 0x70, 0xf8, 0x11, 0xf5, 0x63, 0xae, 0x0e, 0x7f, 0x79, 0xf0, 0xc4, 0x00, 0x17,
|
||||
0x6c, 0xcd, 0xff, 0x4f, 0x70, 0x08, 0x2d, 0xc6, 0x53, 0x5c, 0x51, 0x61, 0xa9, 0xb5, 0xa3, 0xa6,
|
||||
0x29, 0x17, 0x82, 0x84, 0xd0, 0xb3, 0x03, 0xa9, 0x93, 0x95, 0xe0, 0x52, 0xe7, 0x8c, 0x3a, 0xa6,
|
||||
0x19, 0xe9, 0xe4, 0x9c, 0x4b, 0x6d, 0xd4, 0x25, 0x66, 0x17, 0x94, 0x33, 0x2b, 0xd0, 0xaf, 0x8f,
|
||||
0xbc, 0x71, 0x2d, 0xea, 0x16, 0x4d, 0x23, 0x90, 0x0c, 0xa0, 0xa1, 0xf9, 0x06, 0x99, 0xdf, 0xb0,
|
||||
0xe7, 0xbb, 0x22, 0x7c, 0x01, 0xfd, 0x33, 0xdc, 0xe2, 0xe3, 0xd6, 0x18, 0x0e, 0x80, 0x54, 0xd1,
|
||||
0x4a, 0x70, 0xa6, 0x30, 0xfc, 0xe9, 0x41, 0xe7, 0x13, 0xa7, 0xec, 0x41, 0x17, 0x4a, 0x0a, 0x07,
|
||||
0x15, 0x0a, 0x06, 0x2e, 0x10, 0xa5, 0x81, 0xd7, 0x1c, 0xdc, 0x94, 0x8b, 0x94, 0xbc, 0x84, 0x06,
|
||||
0x5f, 0xaf, 0x51, 0x5a, 0x39, 0x9d, 0xe9, 0xc9, 0x24, 0xf7, 0x7e, 0x72, 0x81, 0x4a, 0x51, 0xce,
|
||||
0xce, 0x50, 0x25, 0x92, 0x0a, 0xa3, 0x30, 0x72, 0xc8, 0x70, 0x0e, 0x5d, 0xc7, 0xc4, 0x51, 0x23,
|
||||
0x33, 0x68, 0xc6, 0x4c, 0x7d, 0x47, 0x69, 0x99, 0x3c, 0x70, 0x46, 0x0e, 0x0d, 0x27, 0x70, 0xb8,
|
||||
0x94, 0x34, 0xd9, 0x6c, 0xb1, 0x50, 0xf4, 0x0c, 0xda, 0x49, 0xcc, 0x52, 0x9a, 0xc6, 0x1a, 0x73,
|
||||
0x4d, 0xbb, 0x46, 0xd8, 0x87, 0xa3, 0x12, 0x9f, 0xaf, 0xe4, 0x35, 0x90, 0xfd, 0x0b, 0x08, 0x81,
|
||||
0xba, 0xbe, 0x11, 0xc5, 0x09, 0xf6, 0x9b, 0x1c, 0x43, 0x4d, 0xa5, 0xce, 0xf4, 0x6e, 0x64, 0x3e,
|
||||
0xa7, 0x7f, 0x3c, 0xe8, 0x98, 0xfd, 0x5e, 0xb8, 0xe0, 0x93, 0x37, 0x00, 0xbb, 0xa4, 0x93, 0xa0,
|
||||
0x54, 0xb0, 0x17, 0xff, 0xa0, 0x5f, 0xce, 0xca, 0xc0, 0xbd, 0x82, 0x56, 0x1e, 0x54, 0x32, 0x2c,
|
||||
0xa7, 0xb7, 0xa3, 0x7b, 0xd7, 0x6f, 0x1f, 0x00, 0x76, 0x46, 0x57, 0xee, 0xdc, 0xcb, 0x4a, 0x70,
|
||||
0x72, 0xe7, 0xcc, 0xad, 0x61, 0xfa, 0xdb, 0x03, 0x88, 0x96, 0xf3, 0x42, 0xc9, 0x0c, 0xea, 0xc6,
|
||||
0x1d, 0x32, 0x28, 0xff, 0xa9, 0xc4, 0x26, 0x78, 0xfa, 0x4f, 0x37, 0xb7, 0xf0, 0x1d, 0x34, 0x3e,
|
||||
0x1b, 0x6f, 0xc9, 0x7d, 0xde, 0x05, 0xf7, 0x0d, 0xc9, 0x5b, 0x68, 0xe5, 0x06, 0x55, 0x96, 0x70,
|
||||
0xdb, 0xe2, 0xc0, 0xdf, 0x1f, 0x38, 0x02, 0xef, 0xdb, 0x5f, 0x8a, 0x47, 0xe7, 0x6b, 0xd3, 0x3e,
|
||||
0x42, 0xb3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xd8, 0xff, 0xa8, 0x95, 0x04, 0x00, 0x00,
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package livekit;
|
||||
option go_package = "livekit";
|
||||
option go_package = "github.com/livekit/livekit-server/proto/livekit";
|
||||
|
||||
// internal types, declaring in proto to get serialization for free
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package livekit;
|
||||
option go_package = "livekit";
|
||||
|
||||
option go_package = "github.com/livekit/livekit-server/proto/livekit";
|
||||
|
||||
// Room service that can be performed on any node
|
||||
// they are simple HTTP req/responses
|
||||
service RoomService {
|
||||
// TODO: how do we secure room service?
|
||||
// should be accessible to only internal servers, not external
|
||||
@@ -38,37 +38,3 @@ message DeleteRoomRequest {
|
||||
|
||||
message DeleteRoomResponse {
|
||||
}
|
||||
|
||||
// RTC methods performed on target node
|
||||
service RTCService {
|
||||
rpc Join(JoinRequest) returns (JoinResponse);
|
||||
|
||||
// offer allows client to initiate a RTC session
|
||||
rpc Offer(SessionDescription) returns (SessionDescription);
|
||||
|
||||
// trickle sends more ICE candidates to server
|
||||
rpc Trickle(TrickleRequest) returns (TrickleResponse);
|
||||
}
|
||||
|
||||
message JoinRequest {
|
||||
string room_id = 1;
|
||||
string token = 2;
|
||||
string peer_id = 3;
|
||||
SessionDescription offer = 4;
|
||||
}
|
||||
|
||||
message JoinResponse {
|
||||
SessionDescription answer = 1;
|
||||
}
|
||||
|
||||
message TrickleRequest {
|
||||
string candidate = 1;
|
||||
}
|
||||
|
||||
message TrickleResponse {
|
||||
}
|
||||
|
||||
message SessionDescription {
|
||||
string type = 1; // "answer" | "offer" | "pranswer" | "rollback"
|
||||
bytes sdp = 2;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package livekit;
|
||||
option go_package = "github.com/livekit/livekit-server/proto/livekit";
|
||||
|
||||
// RTC methods performed on target node
|
||||
service RTCService {
|
||||
rpc Signal(stream SignalRequest) returns (stream SignalResponse);
|
||||
}
|
||||
|
||||
message SignalRequest {
|
||||
oneof message {
|
||||
JoinRequest join = 1;
|
||||
SessionDescription negotiate = 2;
|
||||
Trickle trickle = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message SignalResponse {
|
||||
oneof message {
|
||||
JoinResponse jin = 1;
|
||||
SessionDescription negotiate = 2;
|
||||
Trickle trickle = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message JoinRequest {
|
||||
string room_id = 1;
|
||||
string token = 2;
|
||||
string peer_id = 3;
|
||||
SessionDescription offer = 4;
|
||||
}
|
||||
|
||||
message JoinResponse {
|
||||
SessionDescription answer = 1;
|
||||
}
|
||||
|
||||
message Trickle {
|
||||
// serialized JSON structure of candidate init
|
||||
string candidate_init = 1;
|
||||
}
|
||||
|
||||
message SessionDescription {
|
||||
string type = 1; // "answer" | "offer" | "pranswer" | "rollback"
|
||||
string sdp = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user