switch to websockets, remove grpc dependency
This commit is contained in:
@@ -31,10 +31,8 @@ proto: protoc protoc-gen-go twirp-gen
|
|||||||
--plugin=$(PROTOC_GEN_GO) \
|
--plugin=$(PROTOC_GEN_GO) \
|
||||||
-I=proto \
|
-I=proto \
|
||||||
proto/room.proto proto/model.proto ;\
|
proto/room.proto proto/model.proto ;\
|
||||||
protoc --go_out=$(GO_TARGET) --go-grpc_out=$(GO_TARGET) \
|
protoc --go_out=$(GO_TARGET) \
|
||||||
--go_opt=paths=source_relative \
|
--go_opt=paths=source_relative \
|
||||||
--go-grpc_opt=paths=source_relative \
|
|
||||||
--plugin=$(PROTOC_GEN_GO) \
|
|
||||||
-I=proto \
|
-I=proto \
|
||||||
proto/rtc.proto ;\
|
proto/rtc.proto ;\
|
||||||
}
|
}
|
||||||
@@ -45,10 +43,10 @@ ifeq (, $(shell which protoc))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
protoc-gen-go:
|
protoc-gen-go:
|
||||||
ifeq (, $(shell which protoc-gen-go-grpc))
|
ifeq (, $(shell which protoc-gen-go))
|
||||||
@{ \
|
@{ \
|
||||||
echo "installing go protobuf plugin" ;\
|
echo "installing go protobuf plugin" ;\
|
||||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc ;\
|
go install google.golang.org/protobuf/cmd/protoc-gen-go ;\
|
||||||
}
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
// command line util that tests server
|
||||||
+11
-9
@@ -14,7 +14,6 @@ import (
|
|||||||
|
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
"github.com/urfave/negroni"
|
"github.com/urfave/negroni"
|
||||||
"google.golang.org/grpc"
|
|
||||||
|
|
||||||
"github.com/livekit/livekit-server/pkg/config"
|
"github.com/livekit/livekit-server/pkg/config"
|
||||||
"github.com/livekit/livekit-server/pkg/logger"
|
"github.com/livekit/livekit-server/pkg/logger"
|
||||||
@@ -40,7 +39,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := app.Run(os.Args); err != nil {
|
if err := app.Run(os.Args); err != nil {
|
||||||
logger.GetLogger().Fatal(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,9 +77,9 @@ func startServer(c *cli.Context) error {
|
|||||||
type LivekitServer struct {
|
type LivekitServer struct {
|
||||||
config *config.Config
|
config *config.Config
|
||||||
roomServer livekit.TwirpServer
|
roomServer livekit.TwirpServer
|
||||||
rtcServer livekit.RTCServiceServer
|
rtcService *service.RTCService
|
||||||
roomHttp *http.Server
|
roomHttp *http.Server
|
||||||
rtcGrpc *grpc.Server
|
rtcHttp *http.Server
|
||||||
running bool
|
running bool
|
||||||
doneChan chan bool
|
doneChan chan bool
|
||||||
}
|
}
|
||||||
@@ -91,7 +90,7 @@ func NewLivekitServer(conf *config.Config,
|
|||||||
s = &LivekitServer{
|
s = &LivekitServer{
|
||||||
config: conf,
|
config: conf,
|
||||||
roomServer: livekit.NewRoomServiceServer(roomService),
|
roomServer: livekit.NewRoomServiceServer(roomService),
|
||||||
rtcServer: rtcService,
|
rtcService: rtcService,
|
||||||
}
|
}
|
||||||
|
|
||||||
roomHandler := configureMiddlewares(conf, s.roomServer)
|
roomHandler := configureMiddlewares(conf, s.roomServer)
|
||||||
@@ -100,8 +99,11 @@ func NewLivekitServer(conf *config.Config,
|
|||||||
Handler: roomHandler,
|
Handler: roomHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
s.rtcGrpc = grpc.NewServer()
|
rtcHandler := configureMiddlewares(conf, rtcService)
|
||||||
livekit.RegisterRTCServiceServer(s.rtcGrpc, s.rtcServer)
|
s.rtcHttp = &http.Server{
|
||||||
|
Addr: fmt.Sprintf(":%d", conf.RTCPort),
|
||||||
|
Handler: rtcHandler,
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -131,7 +133,7 @@ func (s *LivekitServer) Start() error {
|
|||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
logger.GetLogger().Infow("starting RTC service", "address", rtcAddr)
|
logger.GetLogger().Infow("starting RTC service", "address", rtcAddr)
|
||||||
s.rtcGrpc.Serve(rtcLn)
|
s.rtcHttp.Serve(rtcLn)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
<-s.doneChan
|
<-s.doneChan
|
||||||
@@ -142,7 +144,7 @@ func (s *LivekitServer) Start() error {
|
|||||||
wg.Add(2)
|
wg.Add(2)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
s.rtcGrpc.GracefulStop()
|
s.rtcHttp.Shutdown(ctx)
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ func InitializeServer(conf *config.Config) (*LivekitServer, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
rtcService := service.NewRTCService(roomManager)
|
rtcService := service.NewRTCService(conf, roomManager)
|
||||||
livekitServer, err := NewLivekitServer(conf, roomService, rtcService)
|
livekitServer, err := NewLivekitServer(conf, roomService, rtcService)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ require (
|
|||||||
github.com/golang/protobuf v1.4.3
|
github.com/golang/protobuf v1.4.3
|
||||||
github.com/google/uuid v1.1.2
|
github.com/google/uuid v1.1.2
|
||||||
github.com/google/wire v0.4.0
|
github.com/google/wire v0.4.0
|
||||||
|
github.com/gorilla/websocket v1.4.2
|
||||||
github.com/pion/ion-sfu v1.0.27
|
github.com/pion/ion-sfu v1.0.27
|
||||||
github.com/pion/rtcp v1.2.4
|
github.com/pion/rtcp v1.2.4
|
||||||
github.com/pion/rtp v1.6.1
|
github.com/pion/rtp v1.6.1
|
||||||
@@ -18,6 +19,6 @@ require (
|
|||||||
github.com/urfave/cli/v2 v2.2.0
|
github.com/urfave/cli/v2 v2.2.0
|
||||||
github.com/urfave/negroni v1.0.0
|
github.com/urfave/negroni v1.0.0
|
||||||
go.uber.org/zap v1.16.0
|
go.uber.org/zap v1.16.0
|
||||||
google.golang.org/grpc v1.33.1
|
google.golang.org/protobuf v1.25.0
|
||||||
gopkg.in/yaml.v2 v2.3.0
|
gopkg.in/yaml.v2 v2.3.0
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
|
|||||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
|
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||||
@@ -543,8 +544,6 @@ 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.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
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.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-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-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||||
|
|||||||
+4
-4
@@ -14,7 +14,7 @@ type RoomManager struct {
|
|||||||
config WebRTCConfig
|
config WebRTCConfig
|
||||||
|
|
||||||
rooms map[string]*Room
|
rooms map[string]*Room
|
||||||
roomLock sync.Mutex
|
roomLock sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRoomManager(rtcConf config.RTCConfig, externalIP string) (m *RoomManager, err error) {
|
func NewRoomManager(rtcConf config.RTCConfig, externalIP string) (m *RoomManager, err error) {
|
||||||
@@ -22,7 +22,7 @@ func NewRoomManager(rtcConf config.RTCConfig, externalIP string) (m *RoomManager
|
|||||||
rtcConf: rtcConf,
|
rtcConf: rtcConf,
|
||||||
externalIP: externalIP,
|
externalIP: externalIP,
|
||||||
rooms: make(map[string]*Room),
|
rooms: make(map[string]*Room),
|
||||||
roomLock: sync.Mutex{},
|
roomLock: sync.RWMutex{},
|
||||||
}
|
}
|
||||||
|
|
||||||
wc, err := NewWebRTCConfig(&rtcConf, externalIP)
|
wc, err := NewWebRTCConfig(&rtcConf, externalIP)
|
||||||
@@ -34,8 +34,8 @@ func NewRoomManager(rtcConf config.RTCConfig, externalIP string) (m *RoomManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *RoomManager) GetRoom(roomId string) *Room {
|
func (m *RoomManager) GetRoom(roomId string) *Room {
|
||||||
m.roomLock.Lock()
|
m.roomLock.RLock()
|
||||||
defer m.roomLock.Unlock()
|
defer m.roomLock.RUnlock()
|
||||||
return m.rooms[roomId]
|
return m.rooms[roomId]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -52,9 +52,7 @@ func (r *Room) ToRoomInfo(node *livekit.Node) *livekit.RoomInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Room) Join(peerId string, token string, sdp string) (peer *WebRTCPeer, err error) {
|
func (r *Room) Join(peerId string, sdp string) (peer *WebRTCPeer, err error) {
|
||||||
// TODO: check token and reject
|
|
||||||
|
|
||||||
r.lock.Lock()
|
r.lock.Lock()
|
||||||
defer r.lock.Unlock()
|
defer r.lock.Unlock()
|
||||||
|
|
||||||
|
|||||||
+114
-58
@@ -2,96 +2,127 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
"google.golang.org/grpc/codes"
|
"github.com/pkg/errors"
|
||||||
"google.golang.org/grpc/status"
|
|
||||||
|
|
||||||
|
"github.com/livekit/livekit-server/pkg/config"
|
||||||
"github.com/livekit/livekit-server/pkg/logger"
|
"github.com/livekit/livekit-server/pkg/logger"
|
||||||
"github.com/livekit/livekit-server/pkg/rtc"
|
"github.com/livekit/livekit-server/pkg/rtc"
|
||||||
"github.com/livekit/livekit-server/proto/livekit"
|
"github.com/livekit/livekit-server/proto/livekit"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RTCService struct {
|
type RTCService struct {
|
||||||
livekit.UnimplementedRTCServiceServer
|
manager *rtc.RoomManager
|
||||||
manager *rtc.RoomManager
|
upgrader websocket.Upgrader
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRTCService(manager *rtc.RoomManager) *RTCService {
|
func NewRTCService(conf *config.Config, manager *rtc.RoomManager) *RTCService {
|
||||||
return &RTCService{
|
s := &RTCService{
|
||||||
manager: manager,
|
manager: manager,
|
||||||
|
upgrader: websocket.Upgrader{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if conf.Development {
|
||||||
|
s.upgrader.CheckOrigin = func(r *http.Request) bool {
|
||||||
|
// allow all in dev
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// each client establishes a persistent signaling connection to the server
|
func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
// when the connection is terminated, WebRTC session shall end
|
roomId := r.FormValue("room_id")
|
||||||
// similarly, when WebRTC connection is disconnected, we'll terminate signaling
|
token := r.FormValue("token")
|
||||||
func (s *RTCService) Signal(stream livekit.RTCService_SignalServer) error {
|
peerId := r.FormValue("peer_id")
|
||||||
|
|
||||||
|
logger.GetLogger().Infow("new client connected",
|
||||||
|
"roomId", roomId,
|
||||||
|
"peerId", peerId,
|
||||||
|
)
|
||||||
|
|
||||||
|
room := s.manager.GetRoom(roomId)
|
||||||
|
if room == nil {
|
||||||
|
writeJSONError(w, http.StatusNotFound, "room not found")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if room.Token != token {
|
||||||
|
writeJSONError(w, http.StatusUnauthorized, "invalid room token")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
conn, err := s.upgrader.Upgrade(w, r, nil)
|
||||||
|
if err != nil {
|
||||||
|
logger.GetLogger().Warnw("could not upgrade to WS",
|
||||||
|
"err", err,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
signalConn := NewWSSignalConnection(conn, peerId)
|
||||||
var peer *rtc.WebRTCPeer
|
var peer *rtc.WebRTCPeer
|
||||||
|
|
||||||
|
// read connection and wait for commands
|
||||||
|
|
||||||
|
// TODO: pass in context from WS, so termination of WS would disconnect RTC
|
||||||
|
//ctx := context.Background()
|
||||||
for {
|
for {
|
||||||
req, err := stream.Recv()
|
req, err := signalConn.ReadRequest()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if peer != nil {
|
logger.GetLogger().Errorw("error reading WS",
|
||||||
peer.Close()
|
"err", err,
|
||||||
|
"peerId", peerId,
|
||||||
if err == io.EOF {
|
"roomId", roomId)
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
errStatus, _ := status.FromError(err)
|
|
||||||
if errStatus.Code() == codes.Canceled {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.GetLogger().Errorf("signaling error", errStatus.Message(), errStatus.Code())
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch msg := req.Message.(type) {
|
switch msg := req.Message.(type) {
|
||||||
case *livekit.SignalRequest_Join:
|
case *livekit.SignalRequest_Offer:
|
||||||
peer, err = s.handleJoin(stream, msg.Join)
|
peer, err = s.handleJoin(signalConn, room, msg.Offer.Sdp)
|
||||||
case *livekit.SignalRequest_Negotiate:
|
case *livekit.SignalRequest_Negotiate:
|
||||||
if peer == nil {
|
if peer == nil {
|
||||||
return status.Errorf(codes.FailedPrecondition, "peer has not joined yet")
|
conn.WriteJSON(jsonError(http.StatusNotAcceptable, "cannot negotiate before peer offer"))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
err = s.handleNegotiate(stream, peer, *msg.Negotiate)
|
err = s.handleNegotiate(signalConn, peer, msg.Negotiate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return status.Errorf(codes.Internal, "could not handle megptoate: %v", err)
|
conn.WriteJSON(
|
||||||
|
jsonError(http.StatusInternalServerError, "could not handle negotiate", err.Error()))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
case *livekit.SignalRequest_Trickle:
|
case *livekit.SignalRequest_Trickle:
|
||||||
if peer != nil {
|
if peer != nil {
|
||||||
return status.Errorf(codes.FailedPrecondition, "peer has not joined yet")
|
conn.WriteJSON(jsonError(http.StatusNotAcceptable, "cannot trickle before peer offer"))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = s.handleTrickle(peer, msg.Trickle)
|
err = s.handleTrickle(peer, msg.Trickle)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return status.Errorf(codes.Internal, "could not handle trickle: %v", err)
|
conn.WriteJSON(
|
||||||
|
jsonError(http.StatusInternalServerError, "could not handle trickle", err.Error()))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *RTCService) handleJoin(stream livekit.RTCService_SignalServer, join *livekit.JoinRequest) (*rtc.WebRTCPeer, error) {
|
func (s *RTCService) handleJoin(sc SignalConnection, room *rtc.Room, sdp string) (*rtc.WebRTCPeer, error) {
|
||||||
// join a room
|
peer, err := room.Join(sc.PeerId(), sdp)
|
||||||
room := s.manager.GetRoom(join.RoomId)
|
|
||||||
if room == nil {
|
|
||||||
return nil, status.Errorf(codes.NotFound, "room %s doesn't exist", join.RoomId)
|
|
||||||
}
|
|
||||||
peer, err := room.Join(join.PeerId, join.Token, join.Offer.Sdp)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Errorf(codes.Internal, "could not join room: %v", err)
|
return nil, errors.Wrap(err, "could not join room")
|
||||||
}
|
}
|
||||||
|
|
||||||
offer := webrtc.SessionDescription{
|
offer := webrtc.SessionDescription{
|
||||||
Type: webrtc.SDPTypeOffer,
|
Type: webrtc.SDPTypeOffer,
|
||||||
SDP: string(join.Offer.Sdp),
|
SDP: sdp,
|
||||||
}
|
}
|
||||||
answer, err := peer.Answer(offer)
|
answer, err := peer.Answer(offer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Errorf(codes.Internal, "could not answer offer: %v", err)
|
return nil, errors.Wrap(err, "could not answer offer")
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: it might be better to return error instead of nil
|
// TODO: it might be better to return error instead of nil
|
||||||
@@ -102,7 +133,7 @@ func (s *RTCService) handleJoin(stream livekit.RTCService_SignalServer, join *li
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = stream.Send(&livekit.SignalResponse{
|
err = sc.WriteResponse(&livekit.SignalResponse{
|
||||||
Message: &livekit.SignalResponse_Trickle{
|
Message: &livekit.SignalResponse_Trickle{
|
||||||
Trickle: &livekit.Trickle{
|
Trickle: &livekit.Trickle{
|
||||||
CandidateInit: string(bytes),
|
CandidateInit: string(bytes),
|
||||||
@@ -116,7 +147,7 @@ func (s *RTCService) handleJoin(stream livekit.RTCService_SignalServer, join *li
|
|||||||
|
|
||||||
// send peer new offer
|
// send peer new offer
|
||||||
peer.OnOffer = func(o webrtc.SessionDescription) {
|
peer.OnOffer = func(o webrtc.SessionDescription) {
|
||||||
err := stream.Send(&livekit.SignalResponse{
|
err := sc.WriteResponse(&livekit.SignalResponse{
|
||||||
Message: &livekit.SignalResponse_Negotiate{
|
Message: &livekit.SignalResponse_Negotiate{
|
||||||
Negotiate: ToProtoSessionDescription(o),
|
Negotiate: ToProtoSessionDescription(o),
|
||||||
},
|
},
|
||||||
@@ -128,30 +159,28 @@ func (s *RTCService) handleJoin(stream livekit.RTCService_SignalServer, join *li
|
|||||||
}
|
}
|
||||||
|
|
||||||
// finally send answer
|
// finally send answer
|
||||||
err = stream.Send(&livekit.SignalResponse{
|
err = sc.WriteResponse(&livekit.SignalResponse{
|
||||||
Message: &livekit.SignalResponse_Join{
|
Message: &livekit.SignalResponse_Answer{
|
||||||
Join: &livekit.JoinResponse{
|
Answer: ToProtoSessionDescription(answer),
|
||||||
Answer: ToProtoSessionDescription(answer),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Errorf(codes.Internal, "could not join: %v", err)
|
return nil, errors.Wrap(err, "could not join")
|
||||||
}
|
}
|
||||||
|
|
||||||
return peer, nil
|
return peer, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *RTCService) handleNegotiate(stream livekit.RTCService_SignalServer, peer *rtc.WebRTCPeer, neg livekit.SessionDescription) error {
|
func (s *RTCService) handleNegotiate(sc SignalConnection, peer *rtc.WebRTCPeer, neg *livekit.SessionDescription) error {
|
||||||
if neg.Type == webrtc.SDPTypeOffer.String() {
|
if neg.Type == webrtc.SDPTypeOffer.String() {
|
||||||
offer := FromProtoSessionDescription(&neg)
|
offer := FromProtoSessionDescription(neg)
|
||||||
answer, err := peer.Answer(offer)
|
answer, err := peer.Answer(offer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = stream.Send(&livekit.SignalResponse{
|
err = sc.WriteResponse(&livekit.SignalResponse{
|
||||||
Message: &livekit.SignalResponse_Negotiate{
|
Message: &livekit.SignalResponse_Negotiate{
|
||||||
Negotiate: ToProtoSessionDescription(answer),
|
Negotiate: ToProtoSessionDescription(answer),
|
||||||
},
|
},
|
||||||
@@ -161,7 +190,7 @@ func (s *RTCService) handleNegotiate(stream livekit.RTCService_SignalServer, pee
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else if neg.Type == webrtc.SDPTypeAnswer.String() {
|
} else if neg.Type == webrtc.SDPTypeAnswer.String() {
|
||||||
answer := FromProtoSessionDescription(&neg)
|
answer := FromProtoSessionDescription(neg)
|
||||||
err := peer.SetRemoteDescription(answer)
|
err := peer.SetRemoteDescription(answer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -184,3 +213,30 @@ func (s *RTCService) handleTrickle(peer *rtc.WebRTCPeer, trickle *livekit.Trickl
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type errStruct struct {
|
||||||
|
StatusCode int `json:"statusCode"`
|
||||||
|
Error string `json:"error"`
|
||||||
|
Message string `json:"message,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeJSONError(w http.ResponseWriter, code int, error ...string) {
|
||||||
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
|
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||||
|
w.WriteHeader(code)
|
||||||
|
|
||||||
|
json.NewEncoder(w).Encode(jsonError(code, error...))
|
||||||
|
}
|
||||||
|
|
||||||
|
func jsonError(code int, error ...string) errStruct {
|
||||||
|
es := errStruct{
|
||||||
|
StatusCode: code,
|
||||||
|
}
|
||||||
|
if len(error) > 0 {
|
||||||
|
es.Error = error[0]
|
||||||
|
}
|
||||||
|
if len(error) > 1 {
|
||||||
|
es.Message = error[1]
|
||||||
|
}
|
||||||
|
return es
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
|
"google.golang.org/protobuf/encoding/protojson"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
|
"github.com/livekit/livekit-server/proto/livekit"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SignalConnection interface {
|
||||||
|
PeerId() string
|
||||||
|
ReadRequest() (*livekit.SignalRequest, error)
|
||||||
|
WriteResponse(*livekit.SignalResponse) error
|
||||||
|
}
|
||||||
|
|
||||||
|
type WSSignalConnection struct {
|
||||||
|
peerId string
|
||||||
|
conn *websocket.Conn
|
||||||
|
useJSON bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewWSSignalConnection(conn *websocket.Conn, peerId string) *WSSignalConnection {
|
||||||
|
return &WSSignalConnection{
|
||||||
|
peerId: peerId,
|
||||||
|
conn: conn,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *WSSignalConnection) PeerId() string {
|
||||||
|
return c.peerId
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *WSSignalConnection) ReadRequest() (*livekit.SignalRequest, error) {
|
||||||
|
for {
|
||||||
|
// handle special messages and pass on the rest
|
||||||
|
messageType, payload, err := c.conn.ReadMessage()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
msg := &livekit.SignalRequest{}
|
||||||
|
switch messageType {
|
||||||
|
case websocket.PingMessage:
|
||||||
|
c.conn.WriteMessage(websocket.PongMessage, nil)
|
||||||
|
continue
|
||||||
|
case websocket.BinaryMessage:
|
||||||
|
// protobuf encoded
|
||||||
|
err := proto.Unmarshal(payload, msg)
|
||||||
|
return msg, err
|
||||||
|
case websocket.TextMessage:
|
||||||
|
// json encoded, also write back JSON
|
||||||
|
c.useJSON = true
|
||||||
|
err := protojson.Unmarshal(payload, msg)
|
||||||
|
return msg, err
|
||||||
|
default:
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *WSSignalConnection) WriteResponse(msg *livekit.SignalResponse) error {
|
||||||
|
var msgType int
|
||||||
|
var payload []byte
|
||||||
|
var err error
|
||||||
|
|
||||||
|
if c.useJSON {
|
||||||
|
payload, err = protojson.Marshal(msg)
|
||||||
|
} else {
|
||||||
|
payload, err = proto.Marshal(msg)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return c.conn.WriteMessage(msgType, payload)
|
||||||
|
}
|
||||||
+335
-193
@@ -1,284 +1,426 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.25.0
|
||||||
|
// protoc v3.13.0
|
||||||
// source: model.proto
|
// source: model.proto
|
||||||
|
|
||||||
package livekit
|
package livekit
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
math "math"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
const (
|
||||||
var _ = proto.Marshal
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
var _ = fmt.Errorf
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
var _ = math.Inf
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||||
// is compatible with the proto package it is being compiled against.
|
// of the legacy proto package is being used.
|
||||||
// A compilation error at this line likely means your copy of the
|
const _ = proto.ProtoPackageIsVersion4
|
||||||
// proto package needs to be updated.
|
|
||||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
||||||
|
|
||||||
type Node struct {
|
type Node struct {
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
state protoimpl.MessageState
|
||||||
Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
|
sizeCache protoimpl.SizeCache
|
||||||
RtcPort uint32 `protobuf:"varint,3,opt,name=rtc_port,json=rtcPort,proto3" json:"rtc_port,omitempty"`
|
unknownFields protoimpl.UnknownFields
|
||||||
Stats *NodeStats `protobuf:"bytes,4,opt,name=stats,proto3" json:"stats,omitempty"`
|
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||||
XXX_sizecache int32 `json:"-"`
|
RtcPort uint32 `protobuf:"varint,3,opt,name=rtc_port,json=rtcPort,proto3" json:"rtc_port,omitempty"`
|
||||||
|
Stats *NodeStats `protobuf:"bytes,4,opt,name=stats,proto3" json:"stats,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Node) Reset() { *m = Node{} }
|
func (x *Node) Reset() {
|
||||||
func (m *Node) String() string { return proto.CompactTextString(m) }
|
*x = Node{}
|
||||||
func (*Node) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_model_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Node) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Node) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *Node) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_model_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Node.ProtoReflect.Descriptor instead.
|
||||||
func (*Node) Descriptor() ([]byte, []int) {
|
func (*Node) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_4c16552f9fdb66d8, []int{0}
|
return file_model_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Node) XXX_Unmarshal(b []byte) error {
|
func (x *Node) GetId() string {
|
||||||
return xxx_messageInfo_Node.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.Id
|
||||||
func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
||||||
return xxx_messageInfo_Node.Marshal(b, m, deterministic)
|
|
||||||
}
|
|
||||||
func (m *Node) XXX_Merge(src proto.Message) {
|
|
||||||
xxx_messageInfo_Node.Merge(m, src)
|
|
||||||
}
|
|
||||||
func (m *Node) XXX_Size() int {
|
|
||||||
return xxx_messageInfo_Node.Size(m)
|
|
||||||
}
|
|
||||||
func (m *Node) XXX_DiscardUnknown() {
|
|
||||||
xxx_messageInfo_Node.DiscardUnknown(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var xxx_messageInfo_Node proto.InternalMessageInfo
|
|
||||||
|
|
||||||
func (m *Node) GetId() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.Id
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Node) GetIp() string {
|
func (x *Node) GetIp() string {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.Ip
|
return x.Ip
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Node) GetRtcPort() uint32 {
|
func (x *Node) GetRtcPort() uint32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.RtcPort
|
return x.RtcPort
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Node) GetStats() *NodeStats {
|
func (x *Node) GetStats() *NodeStats {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.Stats
|
return x.Stats
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type NodeStats struct {
|
type NodeStats struct {
|
||||||
NumRooms int32 `protobuf:"varint,1,opt,name=num_rooms,json=numRooms,proto3" json:"num_rooms,omitempty"`
|
state protoimpl.MessageState
|
||||||
NumClients int32 `protobuf:"varint,2,opt,name=num_clients,json=numClients,proto3" json:"num_clients,omitempty"`
|
sizeCache protoimpl.SizeCache
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
unknownFields protoimpl.UnknownFields
|
||||||
XXX_unrecognized []byte `json:"-"`
|
|
||||||
XXX_sizecache int32 `json:"-"`
|
NumRooms int32 `protobuf:"varint,1,opt,name=num_rooms,json=numRooms,proto3" json:"num_rooms,omitempty"`
|
||||||
|
NumClients int32 `protobuf:"varint,2,opt,name=num_clients,json=numClients,proto3" json:"num_clients,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *NodeStats) Reset() { *m = NodeStats{} }
|
func (x *NodeStats) Reset() {
|
||||||
func (m *NodeStats) String() string { return proto.CompactTextString(m) }
|
*x = NodeStats{}
|
||||||
func (*NodeStats) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_model_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeStats) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*NodeStats) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *NodeStats) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_model_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use NodeStats.ProtoReflect.Descriptor instead.
|
||||||
func (*NodeStats) Descriptor() ([]byte, []int) {
|
func (*NodeStats) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_4c16552f9fdb66d8, []int{1}
|
return file_model_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *NodeStats) XXX_Unmarshal(b []byte) error {
|
func (x *NodeStats) GetNumRooms() int32 {
|
||||||
return xxx_messageInfo_NodeStats.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.NumRooms
|
||||||
func (m *NodeStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
||||||
return xxx_messageInfo_NodeStats.Marshal(b, m, deterministic)
|
|
||||||
}
|
|
||||||
func (m *NodeStats) XXX_Merge(src proto.Message) {
|
|
||||||
xxx_messageInfo_NodeStats.Merge(m, src)
|
|
||||||
}
|
|
||||||
func (m *NodeStats) XXX_Size() int {
|
|
||||||
return xxx_messageInfo_NodeStats.Size(m)
|
|
||||||
}
|
|
||||||
func (m *NodeStats) XXX_DiscardUnknown() {
|
|
||||||
xxx_messageInfo_NodeStats.DiscardUnknown(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var xxx_messageInfo_NodeStats proto.InternalMessageInfo
|
|
||||||
|
|
||||||
func (m *NodeStats) GetNumRooms() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.NumRooms
|
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *NodeStats) GetNumClients() int32 {
|
func (x *NodeStats) GetNumClients() int32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.NumClients
|
return x.NumClients
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type Room struct {
|
type Room struct {
|
||||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
state protoimpl.MessageState
|
||||||
EmptyTimeout uint32 `protobuf:"varint,2,opt,name=empty_timeout,json=emptyTimeout,proto3" json:"empty_timeout,omitempty"`
|
sizeCache protoimpl.SizeCache
|
||||||
MaxParticipants uint32 `protobuf:"varint,3,opt,name=max_participants,json=maxParticipants,proto3" json:"max_participants,omitempty"`
|
unknownFields protoimpl.UnknownFields
|
||||||
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"`
|
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
EmptyTimeout uint32 `protobuf:"varint,2,opt,name=empty_timeout,json=emptyTimeout,proto3" json:"empty_timeout,omitempty"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
MaxParticipants uint32 `protobuf:"varint,3,opt,name=max_participants,json=maxParticipants,proto3" json:"max_participants,omitempty"`
|
||||||
XXX_sizecache int32 `json:"-"`
|
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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Room) Reset() { *m = Room{} }
|
func (x *Room) Reset() {
|
||||||
func (m *Room) String() string { return proto.CompactTextString(m) }
|
*x = Room{}
|
||||||
func (*Room) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_model_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Room) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Room) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *Room) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_model_proto_msgTypes[2]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Room.ProtoReflect.Descriptor instead.
|
||||||
func (*Room) Descriptor() ([]byte, []int) {
|
func (*Room) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_4c16552f9fdb66d8, []int{2}
|
return file_model_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Room) XXX_Unmarshal(b []byte) error {
|
func (x *Room) GetRoomId() string {
|
||||||
return xxx_messageInfo_Room.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.RoomId
|
||||||
func (m *Room) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
||||||
return xxx_messageInfo_Room.Marshal(b, m, deterministic)
|
|
||||||
}
|
|
||||||
func (m *Room) XXX_Merge(src proto.Message) {
|
|
||||||
xxx_messageInfo_Room.Merge(m, src)
|
|
||||||
}
|
|
||||||
func (m *Room) XXX_Size() int {
|
|
||||||
return xxx_messageInfo_Room.Size(m)
|
|
||||||
}
|
|
||||||
func (m *Room) XXX_DiscardUnknown() {
|
|
||||||
xxx_messageInfo_Room.DiscardUnknown(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var xxx_messageInfo_Room proto.InternalMessageInfo
|
|
||||||
|
|
||||||
func (m *Room) GetRoomId() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.RoomId
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Room) GetEmptyTimeout() uint32 {
|
func (x *Room) GetEmptyTimeout() uint32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.EmptyTimeout
|
return x.EmptyTimeout
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Room) GetMaxParticipants() uint32 {
|
func (x *Room) GetMaxParticipants() uint32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.MaxParticipants
|
return x.MaxParticipants
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Room) GetCreationTime() int64 {
|
func (x *Room) GetCreationTime() int64 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.CreationTime
|
return x.CreationTime
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Room) GetToken() string {
|
func (x *Room) GetToken() string {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.Token
|
return x.Token
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type DataChannel struct {
|
type DataChannel struct {
|
||||||
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
state protoimpl.MessageState
|
||||||
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
|
sizeCache protoimpl.SizeCache
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
unknownFields protoimpl.UnknownFields
|
||||||
XXX_unrecognized []byte `json:"-"`
|
|
||||||
XXX_sizecache int32 `json:"-"`
|
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||||
|
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DataChannel) Reset() { *m = DataChannel{} }
|
func (x *DataChannel) Reset() {
|
||||||
func (m *DataChannel) String() string { return proto.CompactTextString(m) }
|
*x = DataChannel{}
|
||||||
func (*DataChannel) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_model_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DataChannel) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DataChannel) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DataChannel) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_model_proto_msgTypes[3]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use DataChannel.ProtoReflect.Descriptor instead.
|
||||||
func (*DataChannel) Descriptor() ([]byte, []int) {
|
func (*DataChannel) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_4c16552f9fdb66d8, []int{3}
|
return file_model_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DataChannel) XXX_Unmarshal(b []byte) error {
|
func (x *DataChannel) GetSessionId() string {
|
||||||
return xxx_messageInfo_DataChannel.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.SessionId
|
||||||
func (m *DataChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
||||||
return xxx_messageInfo_DataChannel.Marshal(b, m, deterministic)
|
|
||||||
}
|
|
||||||
func (m *DataChannel) XXX_Merge(src proto.Message) {
|
|
||||||
xxx_messageInfo_DataChannel.Merge(m, src)
|
|
||||||
}
|
|
||||||
func (m *DataChannel) XXX_Size() int {
|
|
||||||
return xxx_messageInfo_DataChannel.Size(m)
|
|
||||||
}
|
|
||||||
func (m *DataChannel) XXX_DiscardUnknown() {
|
|
||||||
xxx_messageInfo_DataChannel.DiscardUnknown(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var xxx_messageInfo_DataChannel proto.InternalMessageInfo
|
|
||||||
|
|
||||||
func (m *DataChannel) GetSessionId() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.SessionId
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DataChannel) GetPayload() []byte {
|
func (x *DataChannel) GetPayload() []byte {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.Payload
|
return x.Payload
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
var File_model_proto protoreflect.FileDescriptor
|
||||||
proto.RegisterType((*Node)(nil), "livekit.Node")
|
|
||||||
proto.RegisterType((*NodeStats)(nil), "livekit.NodeStats")
|
var file_model_proto_rawDesc = []byte{
|
||||||
proto.RegisterType((*Room)(nil), "livekit.Room")
|
0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c,
|
||||||
proto.RegisterType((*DataChannel)(nil), "livekit.DataChannel")
|
0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x22, 0x6b, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e,
|
||||||
|
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e,
|
||||||
|
0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x19,
|
||||||
|
0x0a, 0x08, 0x72, 0x74, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
|
||||||
|
0x52, 0x07, 0x72, 0x74, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61,
|
||||||
|
0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b,
|
||||||
|
0x69, 0x74, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74,
|
||||||
|
0x61, 0x74, 0x73, 0x22, 0x49, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73,
|
||||||
|
0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x1f, 0x0a,
|
||||||
|
0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x05, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xaa,
|
||||||
|
0x01, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f,
|
||||||
|
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64,
|
||||||
|
0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
|
||||||
|
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x54, 0x69,
|
||||||
|
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x72,
|
||||||
|
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||||
|
0x0f, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73,
|
||||||
|
0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d,
|
||||||
|
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f,
|
||||||
|
0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x46, 0x0a, 0x0b, 0x44,
|
||||||
|
0x61, 0x74, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65,
|
||||||
|
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
|
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79,
|
||||||
|
0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c,
|
||||||
|
0x6f, 0x61, 0x64, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||||
|
0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||||
|
0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6c,
|
||||||
|
0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) }
|
var (
|
||||||
|
file_model_proto_rawDescOnce sync.Once
|
||||||
|
file_model_proto_rawDescData = file_model_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
var fileDescriptor_4c16552f9fdb66d8 = []byte{
|
func file_model_proto_rawDescGZIP() []byte {
|
||||||
// 349 bytes of a gzipped FileDescriptorProto
|
file_model_proto_rawDescOnce.Do(func() {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x5f, 0xcb, 0xd3, 0x30,
|
file_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_proto_rawDescData)
|
||||||
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,
|
return file_model_proto_rawDescData
|
||||||
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,
|
var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||||
0xa3, 0x32, 0xa5, 0x33, 0xd1, 0x86, 0x6c, 0xf2, 0xd9, 0x98, 0x0d, 0x79, 0x0b, 0x2b, 0x8b, 0x4d,
|
var file_model_proto_goTypes = []interface{}{
|
||||||
0x6d, 0xb4, 0xc5, 0x7c, 0xbe, 0x8d, 0xca, 0x0d, 0x4d, 0x2c, 0x36, 0x47, 0x6d, 0x91, 0x94, 0x10,
|
(*Node)(nil), // 0: livekit.Node
|
||||||
0x3b, 0x64, 0xe8, 0xf2, 0xc5, 0x36, 0x2a, 0xb3, 0xaf, 0xa4, 0x1a, 0xdd, 0x95, 0x17, 0xff, 0xf6,
|
(*NodeStats)(nil), // 1: livekit.NodeStats
|
||||||
0x27, 0x74, 0xb8, 0x50, 0x1c, 0x20, 0x7d, 0x30, 0xf2, 0x0e, 0x52, 0xd5, 0xcb, 0xda, 0x6a, 0x2d,
|
(*Room)(nil), // 2: livekit.Room
|
||||||
0x5d, 0x18, 0x1c, 0xd3, 0x95, 0xea, 0x25, 0xf5, 0x99, 0x7c, 0x80, 0xcc, 0x1f, 0x36, 0x9d, 0xe0,
|
(*DataChannel)(nil), // 3: livekit.DataChannel
|
||||||
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,
|
var file_model_proto_depIdxs = []int32{
|
||||||
0x7b, 0x8d, 0x42, 0x72, 0xdd, 0x63, 0x90, 0x6c, 0xe8, 0x3a, 0xc0, 0x3f, 0x03, 0x23, 0x9f, 0xe0,
|
1, // 0: livekit.Node.stats:type_name -> livekit.NodeStats
|
||||||
0x95, 0x64, 0xb7, 0xda, 0x30, 0x8b, 0xa2, 0x11, 0x86, 0xf9, 0x61, 0xc3, 0x7a, 0x2f, 0x25, 0xbb,
|
1, // [1:1] is the sub-list for method output_type
|
||||||
0x1d, 0x9f, 0x61, 0xef, 0x6b, 0x2c, 0x67, 0x28, 0xb4, 0x0a, 0xca, 0xb0, 0xee, 0x9c, 0xae, 0x27,
|
1, // [1:1] is the sub-list for method input_type
|
||||||
0xe8, 0x95, 0xe4, 0x35, 0xc4, 0xa8, 0x2f, 0x5c, 0xe5, 0x71, 0xe8, 0x32, 0x84, 0xe2, 0x27, 0x64,
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
0x3f, 0x18, 0xb2, 0xfd, 0x99, 0x29, 0xc5, 0x3b, 0xf2, 0x1e, 0xc0, 0x71, 0xe7, 0xbc, 0xe8, 0xd1,
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
0x3a, 0x1d, 0xc9, 0xa1, 0x25, 0x39, 0x24, 0x86, 0xdd, 0x3b, 0xcd, 0xda, 0x50, 0x79, 0x4d, 0xa7,
|
0, // [0:1] is the sub-list for field type_name
|
||||||
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,
|
func init() { file_model_proto_init() }
|
||||||
|
func file_model_proto_init() {
|
||||||
|
if File_model_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Node); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*NodeStats); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_model_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Room); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_model_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DataChannel); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_model_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 4,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_model_proto_goTypes,
|
||||||
|
DependencyIndexes: file_model_proto_depIdxs,
|
||||||
|
MessageInfos: file_model_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_model_proto = out.File
|
||||||
|
file_model_proto_rawDesc = nil
|
||||||
|
file_model_proto_goTypes = nil
|
||||||
|
file_model_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|||||||
+380
-204
@@ -1,294 +1,470 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.25.0
|
||||||
|
// protoc v3.13.0
|
||||||
// source: room.proto
|
// source: room.proto
|
||||||
|
|
||||||
package livekit
|
package livekit
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
math "math"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
const (
|
||||||
var _ = proto.Marshal
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
var _ = fmt.Errorf
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
var _ = math.Inf
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||||
// is compatible with the proto package it is being compiled against.
|
// of the legacy proto package is being used.
|
||||||
// A compilation error at this line likely means your copy of the
|
const _ = proto.ProtoPackageIsVersion4
|
||||||
// proto package needs to be updated.
|
|
||||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
||||||
|
|
||||||
type CreateRoomRequest struct {
|
type CreateRoomRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
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
|
// 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"`
|
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"`
|
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 (x *CreateRoomRequest) Reset() {
|
||||||
func (m *CreateRoomRequest) String() string { return proto.CompactTextString(m) }
|
*x = CreateRoomRequest{}
|
||||||
func (*CreateRoomRequest) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_room_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateRoomRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CreateRoomRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CreateRoomRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_room_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use CreateRoomRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*CreateRoomRequest) Descriptor() ([]byte, []int) {
|
func (*CreateRoomRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c5fd27dd97284ef4, []int{0}
|
return file_room_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *CreateRoomRequest) XXX_Unmarshal(b []byte) error {
|
func (x *CreateRoomRequest) GetRoomId() string {
|
||||||
return xxx_messageInfo_CreateRoomRequest.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.RoomId
|
||||||
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 ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *CreateRoomRequest) GetEmptyTimeout() uint32 {
|
func (x *CreateRoomRequest) GetEmptyTimeout() uint32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.EmptyTimeout
|
return x.EmptyTimeout
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *CreateRoomRequest) GetMaxParticipants() uint32 {
|
func (x *CreateRoomRequest) GetMaxParticipants() uint32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.MaxParticipants
|
return x.MaxParticipants
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetRoomRequest struct {
|
type GetRoomRequest struct {
|
||||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
state protoimpl.MessageState
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
sizeCache protoimpl.SizeCache
|
||||||
XXX_unrecognized []byte `json:"-"`
|
unknownFields protoimpl.UnknownFields
|
||||||
XXX_sizecache int32 `json:"-"`
|
|
||||||
|
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *GetRoomRequest) Reset() { *m = GetRoomRequest{} }
|
func (x *GetRoomRequest) Reset() {
|
||||||
func (m *GetRoomRequest) String() string { return proto.CompactTextString(m) }
|
*x = GetRoomRequest{}
|
||||||
func (*GetRoomRequest) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_room_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetRoomRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetRoomRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetRoomRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_room_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetRoomRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*GetRoomRequest) Descriptor() ([]byte, []int) {
|
func (*GetRoomRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c5fd27dd97284ef4, []int{1}
|
return file_room_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *GetRoomRequest) XXX_Unmarshal(b []byte) error {
|
func (x *GetRoomRequest) GetRoomId() string {
|
||||||
return xxx_messageInfo_GetRoomRequest.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.RoomId
|
||||||
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 ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type RoomInfo struct {
|
type RoomInfo struct {
|
||||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
state protoimpl.MessageState
|
||||||
NodeIp string `protobuf:"bytes,2,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty"`
|
sizeCache protoimpl.SizeCache
|
||||||
NodeRtcPort uint32 `protobuf:"varint,3,opt,name=node_rtc_port,json=nodeRtcPort,proto3" json:"node_rtc_port,omitempty"`
|
unknownFields protoimpl.UnknownFields
|
||||||
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"`
|
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
NodeIp string `protobuf:"bytes,2,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
NodeRtcPort uint32 `protobuf:"varint,3,opt,name=node_rtc_port,json=nodeRtcPort,proto3" json:"node_rtc_port,omitempty"`
|
||||||
XXX_sizecache int32 `json:"-"`
|
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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RoomInfo) Reset() { *m = RoomInfo{} }
|
func (x *RoomInfo) Reset() {
|
||||||
func (m *RoomInfo) String() string { return proto.CompactTextString(m) }
|
*x = RoomInfo{}
|
||||||
func (*RoomInfo) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_room_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RoomInfo) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RoomInfo) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RoomInfo) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_room_proto_msgTypes[2]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use RoomInfo.ProtoReflect.Descriptor instead.
|
||||||
func (*RoomInfo) Descriptor() ([]byte, []int) {
|
func (*RoomInfo) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c5fd27dd97284ef4, []int{2}
|
return file_room_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RoomInfo) XXX_Unmarshal(b []byte) error {
|
func (x *RoomInfo) GetRoomId() string {
|
||||||
return xxx_messageInfo_RoomInfo.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.RoomId
|
||||||
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 ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RoomInfo) GetNodeIp() string {
|
func (x *RoomInfo) GetNodeIp() string {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.NodeIp
|
return x.NodeIp
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RoomInfo) GetNodeRtcPort() uint32 {
|
func (x *RoomInfo) GetNodeRtcPort() uint32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.NodeRtcPort
|
return x.NodeRtcPort
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RoomInfo) GetCreationTime() int64 {
|
func (x *RoomInfo) GetCreationTime() int64 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.CreationTime
|
return x.CreationTime
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RoomInfo) GetToken() string {
|
func (x *RoomInfo) GetToken() string {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.Token
|
return x.Token
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteRoomRequest struct {
|
type DeleteRoomRequest struct {
|
||||||
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
state protoimpl.MessageState
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
sizeCache protoimpl.SizeCache
|
||||||
XXX_unrecognized []byte `json:"-"`
|
unknownFields protoimpl.UnknownFields
|
||||||
XXX_sizecache int32 `json:"-"`
|
|
||||||
|
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DeleteRoomRequest) Reset() { *m = DeleteRoomRequest{} }
|
func (x *DeleteRoomRequest) Reset() {
|
||||||
func (m *DeleteRoomRequest) String() string { return proto.CompactTextString(m) }
|
*x = DeleteRoomRequest{}
|
||||||
func (*DeleteRoomRequest) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_room_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DeleteRoomRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DeleteRoomRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DeleteRoomRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_room_proto_msgTypes[3]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use DeleteRoomRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*DeleteRoomRequest) Descriptor() ([]byte, []int) {
|
func (*DeleteRoomRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c5fd27dd97284ef4, []int{3}
|
return file_room_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DeleteRoomRequest) XXX_Unmarshal(b []byte) error {
|
func (x *DeleteRoomRequest) GetRoomId() string {
|
||||||
return xxx_messageInfo_DeleteRoomRequest.Unmarshal(m, b)
|
if x != nil {
|
||||||
}
|
return x.RoomId
|
||||||
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 ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteRoomResponse struct {
|
type DeleteRoomResponse struct {
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
state protoimpl.MessageState
|
||||||
XXX_unrecognized []byte `json:"-"`
|
sizeCache protoimpl.SizeCache
|
||||||
XXX_sizecache int32 `json:"-"`
|
unknownFields protoimpl.UnknownFields
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DeleteRoomResponse) Reset() { *m = DeleteRoomResponse{} }
|
func (x *DeleteRoomResponse) Reset() {
|
||||||
func (m *DeleteRoomResponse) String() string { return proto.CompactTextString(m) }
|
*x = DeleteRoomResponse{}
|
||||||
func (*DeleteRoomResponse) ProtoMessage() {}
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_room_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DeleteRoomResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DeleteRoomResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DeleteRoomResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_room_proto_msgTypes[4]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use DeleteRoomResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*DeleteRoomResponse) Descriptor() ([]byte, []int) {
|
func (*DeleteRoomResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c5fd27dd97284ef4, []int{4}
|
return file_room_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DeleteRoomResponse) XXX_Unmarshal(b []byte) error {
|
var File_room_proto protoreflect.FileDescriptor
|
||||||
return xxx_messageInfo_DeleteRoomResponse.Unmarshal(m, b)
|
|
||||||
}
|
var file_room_proto_rawDesc = []byte{
|
||||||
func (m *DeleteRoomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
0x0a, 0x0a, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x69,
|
||||||
return xxx_messageInfo_DeleteRoomResponse.Marshal(b, m, deterministic)
|
0x76, 0x65, 0x6b, 0x69, 0x74, 0x22, 0x7c, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
|
||||||
}
|
0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f,
|
||||||
func (m *DeleteRoomResponse) XXX_Merge(src proto.Message) {
|
0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f,
|
||||||
xxx_messageInfo_DeleteRoomResponse.Merge(m, src)
|
0x6d, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d,
|
||||||
}
|
0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x74,
|
||||||
func (m *DeleteRoomResponse) XXX_Size() int {
|
0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f,
|
||||||
return xxx_messageInfo_DeleteRoomResponse.Size(m)
|
0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01,
|
||||||
}
|
0x28, 0x0d, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
|
||||||
func (m *DeleteRoomResponse) XXX_DiscardUnknown() {
|
0x6e, 0x74, 0x73, 0x22, 0x29, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65,
|
||||||
xxx_messageInfo_DeleteRoomResponse.DiscardUnknown(m)
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64,
|
||||||
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0x9b,
|
||||||
|
0x01, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x07, 0x72,
|
||||||
|
0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f,
|
||||||
|
0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18,
|
||||||
|
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x70, 0x12, 0x22, 0x0a,
|
||||||
|
0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x74, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03,
|
||||||
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x74, 0x63, 0x50, 0x6f, 0x72,
|
||||||
|
0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
|
||||||
|
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x11,
|
||||||
|
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65,
|
||||||
|
0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x32, 0xc8, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||||
|
0x12, 0x3b, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x1a,
|
||||||
|
0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
|
||||||
|
0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6c, 0x69, 0x76,
|
||||||
|
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a,
|
||||||
|
0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x17, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b,
|
||||||
|
0x69, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x11, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d,
|
||||||
|
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x45, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f,
|
||||||
|
0x6f, 0x6d, 0x12, 0x1a, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c,
|
||||||
|
0x65, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,
|
||||||
|
0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52,
|
||||||
|
0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67,
|
||||||
|
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||||
|
0x74, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var xxx_messageInfo_DeleteRoomResponse proto.InternalMessageInfo
|
var (
|
||||||
|
file_room_proto_rawDescOnce sync.Once
|
||||||
|
file_room_proto_rawDescData = file_room_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func file_room_proto_rawDescGZIP() []byte {
|
||||||
proto.RegisterType((*CreateRoomRequest)(nil), "livekit.CreateRoomRequest")
|
file_room_proto_rawDescOnce.Do(func() {
|
||||||
proto.RegisterType((*GetRoomRequest)(nil), "livekit.GetRoomRequest")
|
file_room_proto_rawDescData = protoimpl.X.CompressGZIP(file_room_proto_rawDescData)
|
||||||
proto.RegisterType((*RoomInfo)(nil), "livekit.RoomInfo")
|
})
|
||||||
proto.RegisterType((*DeleteRoomRequest)(nil), "livekit.DeleteRoomRequest")
|
return file_room_proto_rawDescData
|
||||||
proto.RegisterType((*DeleteRoomResponse)(nil), "livekit.DeleteRoomResponse")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("room.proto", fileDescriptor_c5fd27dd97284ef4) }
|
var file_room_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||||
|
var file_room_proto_goTypes = []interface{}{
|
||||||
|
(*CreateRoomRequest)(nil), // 0: livekit.CreateRoomRequest
|
||||||
|
(*GetRoomRequest)(nil), // 1: livekit.GetRoomRequest
|
||||||
|
(*RoomInfo)(nil), // 2: livekit.RoomInfo
|
||||||
|
(*DeleteRoomRequest)(nil), // 3: livekit.DeleteRoomRequest
|
||||||
|
(*DeleteRoomResponse)(nil), // 4: livekit.DeleteRoomResponse
|
||||||
|
}
|
||||||
|
var file_room_proto_depIdxs = []int32{
|
||||||
|
0, // 0: livekit.RoomService.CreateRoom:input_type -> livekit.CreateRoomRequest
|
||||||
|
1, // 1: livekit.RoomService.GetRoom:input_type -> livekit.GetRoomRequest
|
||||||
|
3, // 2: livekit.RoomService.DeleteRoom:input_type -> livekit.DeleteRoomRequest
|
||||||
|
2, // 3: livekit.RoomService.CreateRoom:output_type -> livekit.RoomInfo
|
||||||
|
2, // 4: livekit.RoomService.GetRoom:output_type -> livekit.RoomInfo
|
||||||
|
4, // 5: livekit.RoomService.DeleteRoom:output_type -> livekit.DeleteRoomResponse
|
||||||
|
3, // [3:6] is the sub-list for method output_type
|
||||||
|
0, // [0:3] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
var fileDescriptor_c5fd27dd97284ef4 = []byte{
|
func init() { file_room_proto_init() }
|
||||||
// 360 bytes of a gzipped FileDescriptorProto
|
func file_room_proto_init() {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0x6f, 0xda, 0x40,
|
if File_room_proto != nil {
|
||||||
0x10, 0x95, 0x4b, 0xc1, 0x65, 0x80, 0xb6, 0xac, 0x90, 0xb0, 0xe8, 0x05, 0xb9, 0x17, 0x90, 0x5a,
|
return
|
||||||
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,
|
if !protoimpl.UnsafeEnabled {
|
||||||
0x47, 0x04, 0x91, 0x38, 0x59, 0xf3, 0xde, 0xb3, 0xe7, 0xbd, 0x37, 0x06, 0xd0, 0x44, 0x69, 0xa0,
|
file_room_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
0x34, 0x31, 0x09, 0x77, 0x26, 0x17, 0x38, 0x95, 0xec, 0xbf, 0x40, 0xf3, 0x42, 0x63, 0xcc, 0x18,
|
switch v := v.(*CreateRoomRequest); i {
|
||||||
0x12, 0xa5, 0x21, 0x3e, 0xcd, 0x31, 0x67, 0xd1, 0x06, 0xd7, 0x68, 0x23, 0x39, 0xf1, 0x9c, 0xae,
|
case 0:
|
||||||
0xd3, 0xab, 0x86, 0x15, 0x33, 0x0e, 0x27, 0xe2, 0x37, 0x34, 0x30, 0x55, 0xfc, 0x1c, 0xb1, 0x4c,
|
return &v.state
|
||||||
0x91, 0xe6, 0xec, 0x7d, 0xe9, 0x3a, 0xbd, 0x46, 0x58, 0xb7, 0xe0, 0xed, 0x0a, 0x13, 0x7d, 0xf8,
|
case 1:
|
||||||
0x99, 0xc6, 0xcb, 0x48, 0xc5, 0x9a, 0x65, 0x22, 0x55, 0x9c, 0x71, 0xee, 0x95, 0xac, 0xee, 0x47,
|
return &v.sizeCache
|
||||||
0x1a, 0x2f, 0x47, 0x3b, 0xb0, 0xdf, 0x87, 0xef, 0xd7, 0xc8, 0xc7, 0xac, 0xf6, 0x5f, 0x1d, 0xf8,
|
case 2:
|
||||||
0x66, 0x84, 0xc3, 0xec, 0x9e, 0x3e, 0x37, 0xd8, 0x06, 0x37, 0xa3, 0x09, 0x46, 0x52, 0x59, 0x6b,
|
return &v.unknownFields
|
||||||
0xd5, 0xb0, 0x62, 0xc6, 0xa1, 0x12, 0x3e, 0x34, 0x2c, 0xa1, 0x39, 0x89, 0x14, 0x69, 0x2e, 0x1c,
|
default:
|
||||||
0xd5, 0x0c, 0x18, 0x72, 0x32, 0x22, 0xcd, 0x26, 0x5d, 0x62, 0xba, 0x90, 0x94, 0xd9, 0x80, 0xde,
|
return nil
|
||||||
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,
|
file_room_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
0xc5, 0x19, 0xc0, 0xf6, 0x34, 0xa2, 0x13, 0x14, 0x27, 0x0b, 0xf6, 0xee, 0xd5, 0x69, 0x6e, 0xb8,
|
switch v := v.(*GetRoomRequest); i {
|
||||||
0x4d, 0x43, 0xa7, 0xe0, 0x16, 0xcd, 0x8a, 0xf6, 0x86, 0xfd, 0xd8, 0xf5, 0xa1, 0xd7, 0xae, 0x00,
|
case 0:
|
||||||
0xb6, 0xce, 0x76, 0x76, 0xee, 0x85, 0xeb, 0xfc, 0x3a, 0xc8, 0xad, 0xa2, 0x9c, 0xff, 0xbb, 0x1b,
|
return &v.state
|
||||||
0x3c, 0x48, 0x7e, 0x9c, 0x8f, 0x83, 0x84, 0xd2, 0x41, 0x21, 0x5c, 0x3f, 0xff, 0xe6, 0xa8, 0x17,
|
case 1:
|
||||||
0xa8, 0x07, 0xf6, 0x4f, 0x5c, 0x83, 0xe3, 0x8a, 0x1d, 0x4f, 0xde, 0x03, 0x00, 0x00, 0xff, 0xff,
|
return &v.sizeCache
|
||||||
0x88, 0x0b, 0xf0, 0x4d, 0xa6, 0x02, 0x00, 0x00,
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_room_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*RoomInfo); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_room_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DeleteRoomRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_room_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DeleteRoomResponse); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_room_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 5,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_room_proto_goTypes,
|
||||||
|
DependencyIndexes: file_room_proto_depIdxs,
|
||||||
|
MessageInfos: file_room_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_room_proto = out.File
|
||||||
|
file_room_proto_rawDesc = nil
|
||||||
|
file_room_proto_goTypes = nil
|
||||||
|
file_room_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,441 +0,0 @@
|
|||||||
// 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_Join
|
|
||||||
// *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_Join struct {
|
|
||||||
Join *JoinResponse `protobuf:"bytes,1,opt,name=join,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_Join) 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) GetJoin() *JoinResponse {
|
|
||||||
if x, ok := m.GetMessage().(*SignalResponse_Join); ok {
|
|
||||||
return x.Join
|
|
||||||
}
|
|
||||||
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_Join)(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{
|
|
||||||
// 403 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x93, 0x4f, 0x6f, 0xd3, 0x40,
|
|
||||||
0x10, 0xc5, 0x63, 0x92, 0xda, 0xf2, 0x94, 0x56, 0xd5, 0xa8, 0x50, 0x0b, 0x2e, 0xc8, 0x12, 0x52,
|
|
||||||
0xc5, 0x1f, 0xa7, 0x7f, 0x6e, 0x20, 0x2e, 0x2d, 0x87, 0x04, 0x6e, 0x9b, 0x9e, 0xb8, 0x54, 0xae,
|
|
||||||
0x3d, 0x31, 0x43, 0x92, 0x5d, 0xb3, 0xbb, 0x09, 0xe2, 0x1b, 0xf0, 0x75, 0x10, 0x5f, 0x10, 0x79,
|
|
||||||
0xbd, 0x4e, 0x02, 0x91, 0xe0, 0xd8, 0x93, 0x77, 0x46, 0xbf, 0xb7, 0x7a, 0xef, 0x69, 0x0d, 0xb1,
|
|
||||||
0xb6, 0x45, 0x56, 0x6b, 0x65, 0x15, 0x46, 0x73, 0x5e, 0xd1, 0x8c, 0x6d, 0xfa, 0x33, 0x80, 0x83,
|
|
||||||
0x09, 0x57, 0x32, 0x9f, 0x0b, 0xfa, 0xba, 0x24, 0x63, 0xf1, 0x05, 0x0c, 0xbe, 0x28, 0x96, 0x49,
|
|
||||||
0xf0, 0x2c, 0x38, 0xdd, 0xbf, 0x38, 0xce, 0x3c, 0x99, 0x7d, 0x50, 0x2c, 0x3d, 0x33, 0xea, 0x09,
|
|
||||||
0xc7, 0xe0, 0x5b, 0x88, 0x25, 0x55, 0xca, 0x72, 0x6e, 0x29, 0x79, 0xe0, 0x04, 0x4f, 0xd7, 0x82,
|
|
||||||
0x09, 0x19, 0xc3, 0x4a, 0xbe, 0x27, 0x53, 0x68, 0xae, 0x2d, 0x2b, 0x39, 0xea, 0x89, 0x0d, 0x8f,
|
|
||||||
0xaf, 0x20, 0xb2, 0x9a, 0x8b, 0xd9, 0x9c, 0x92, 0xbe, 0x93, 0x1e, 0xad, 0xa5, 0x37, 0xed, 0x7e,
|
|
||||||
0xd4, 0x13, 0x1d, 0x72, 0x15, 0x43, 0xb4, 0x20, 0x63, 0xf2, 0x8a, 0xd2, 0x5f, 0x01, 0x1c, 0x76,
|
|
||||||
0x9e, 0x4d, 0xad, 0xa4, 0x21, 0x7c, 0xf9, 0x87, 0xe9, 0x47, 0x7f, 0x99, 0x6e, 0xa1, 0x7b, 0x76,
|
|
||||||
0xfd, 0x23, 0x80, 0xfd, 0xad, 0x0e, 0xf1, 0x04, 0x22, 0xad, 0xd4, 0xe2, 0x96, 0x4b, 0xe7, 0x3a,
|
|
||||||
0x16, 0x61, 0x33, 0x8e, 0x4b, 0x3c, 0x86, 0x3d, 0xab, 0x66, 0x24, 0x9d, 0xb5, 0x58, 0xb4, 0x43,
|
|
||||||
0x83, 0xd7, 0x44, 0xba, 0xc1, 0xfb, 0x2d, 0xde, 0x8c, 0xe3, 0x12, 0xcf, 0x61, 0x4f, 0x4d, 0xa7,
|
|
||||||
0xa4, 0x93, 0xc1, 0x7f, 0x93, 0x88, 0x96, 0x4c, 0xaf, 0xe1, 0xe1, 0x76, 0x31, 0x78, 0x09, 0x61,
|
|
||||||
0x2e, 0xcd, 0x37, 0xd2, 0xbe, 0xbf, 0x7f, 0xde, 0xe1, 0xd1, 0xf4, 0x0c, 0x22, 0x1f, 0x18, 0x9f,
|
|
||||||
0xc3, 0x61, 0x91, 0xcb, 0x92, 0xcb, 0xdc, 0xd2, 0x2d, 0x4b, 0xb6, 0x3e, 0xd1, 0xc1, 0x7a, 0x3b,
|
|
||||||
0x96, 0x6c, 0xd3, 0x37, 0x80, 0xbb, 0xf7, 0x21, 0xc2, 0xc0, 0x7e, 0xaf, 0xc9, 0x4b, 0xdc, 0x19,
|
|
||||||
0x8f, 0xa0, 0x6f, 0xca, 0xda, 0x17, 0xd0, 0x1c, 0x2f, 0x3e, 0x02, 0x88, 0x9b, 0xeb, 0x09, 0xe9,
|
|
||||||
0x15, 0x17, 0x84, 0xef, 0x20, 0x6c, 0x1f, 0x00, 0x3e, 0xde, 0x58, 0xdd, 0x7e, 0xc5, 0x4f, 0x4e,
|
|
||||||
0x76, 0xf6, 0x6d, 0xd6, 0xd3, 0xe0, 0x2c, 0xb8, 0x3a, 0xff, 0x34, 0xac, 0xd8, 0x7e, 0x5e, 0xde,
|
|
||||||
0x65, 0x85, 0x5a, 0x0c, 0x3d, 0xd8, 0x7d, 0x5f, 0x1b, 0xd2, 0x2b, 0xd2, 0x43, 0xf7, 0xa3, 0x74,
|
|
||||||
0xcb, 0xbb, 0xd0, 0x8d, 0x97, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0xe8, 0xef, 0x85, 0x44,
|
|
||||||
0x03, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
// 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",
|
|
||||||
}
|
|
||||||
+2
-18
@@ -3,14 +3,9 @@ syntax = "proto3";
|
|||||||
package livekit;
|
package livekit;
|
||||||
option go_package = "github.com/livekit/livekit-server/proto/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 {
|
message SignalRequest {
|
||||||
oneof message {
|
oneof message {
|
||||||
JoinRequest join = 1;
|
SessionDescription offer = 1;
|
||||||
SessionDescription negotiate = 2;
|
SessionDescription negotiate = 2;
|
||||||
Trickle trickle = 3;
|
Trickle trickle = 3;
|
||||||
}
|
}
|
||||||
@@ -18,23 +13,12 @@ message SignalRequest {
|
|||||||
|
|
||||||
message SignalResponse {
|
message SignalResponse {
|
||||||
oneof message {
|
oneof message {
|
||||||
JoinResponse join = 1;
|
SessionDescription answer = 1;
|
||||||
SessionDescription negotiate = 2;
|
SessionDescription negotiate = 2;
|
||||||
Trickle trickle = 3;
|
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 {
|
message Trickle {
|
||||||
// serialized JSON structure of candidate init
|
// serialized JSON structure of candidate init
|
||||||
string candidate_init = 1;
|
string candidate_init = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user