checkpoint
This commit is contained in:
+1
-1
@@ -14,4 +14,4 @@ livekit-server
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
.idea/
|
||||
.idea/
|
||||
|
||||
@@ -1,2 +1,37 @@
|
||||
|
||||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
||||
ifeq (,$(shell go env GOBIN))
|
||||
GOBIN=$(shell go env GOPATH)/bin
|
||||
else
|
||||
GOBIN=$(shell go env GOBIN)
|
||||
endif
|
||||
|
||||
server:
|
||||
go build -i -o livekit-server
|
||||
|
||||
GO_TARGET=proto
|
||||
proto: protoc goproto
|
||||
@{ \
|
||||
protoc --go_out=$(GO_TARGET) --go-grpc_out=$(GO_TARGET) \
|
||||
--go_opt=paths=source_relative \
|
||||
--go-grpc_opt=paths=source_relative \
|
||||
--plugin=$(PROTOC_GEN_GO) \
|
||||
-I=proto \
|
||||
proto/*.proto ;\
|
||||
}
|
||||
|
||||
protoc:
|
||||
ifeq (, $(shell which protoc))
|
||||
echo "protoc is required, and is not installed"
|
||||
endif
|
||||
|
||||
goproto:
|
||||
ifeq (, $(shell which protoc-gen-go-grpc))
|
||||
@{ \
|
||||
echo "installing go protobuf plugin" ;\
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc ;\
|
||||
}
|
||||
PROTOC_GEN_GO=$(GOBIN)/protoc-gen-go-grpc
|
||||
else
|
||||
PROTOC_GEN_GO=$(shell which protoc-gen-go-grpc)
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,15 @@ module github.com/livekit/livekit-server
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/golang/protobuf v1.4.2
|
||||
github.com/google/uuid v1.1.2
|
||||
github.com/pion/stun v0.3.5
|
||||
github.com/pion/webrtc/v3 v3.0.0-beta.6 // indirect
|
||||
golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c // indirect
|
||||
golang.org/x/sys v0.0.0-20201004230629-f6757f270073 // indirect
|
||||
golang.org/x/text v0.3.3 // indirect
|
||||
google.golang.org/genproto v0.0.0-20201002142447-3860012362da // indirect
|
||||
google.golang.org/grpc v1.32.0
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0 // indirect
|
||||
google.golang.org/protobuf v1.25.0 // indirect
|
||||
)
|
||||
|
||||
@@ -12,13 +12,19 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
|
||||
github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
@@ -37,11 +43,14 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
@@ -49,6 +58,7 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
@@ -135,6 +145,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
@@ -206,6 +217,8 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c h1:dk0ukUIHmGHqASjP0iue2261isepFCC6XRCSd1nHgDw=
|
||||
golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c/go.mod h1:iQL9McJNjoIa5mjH6nYTCTZXUN6RP+XW3eib7Ya3XcI=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@@ -231,10 +244,16 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201004230629-f6757f270073 h1:h6POl/ao7bJKsyalYGo1qALE/khxX70Enx+E/Skq+XE=
|
||||
golang.org/x/sys v0.0.0-20201004230629-f6757f270073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -244,6 +263,7 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -260,18 +280,36 @@ google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=
|
||||
google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20201002142447-3860012362da h1:DTQYk4u7nICKkkVZsBv0/0po0ChISxAJ5CTAfUhO0PQ=
|
||||
google.golang.org/genproto v0.0.0-20201002142447-3860012362da/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0=
|
||||
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0 h1:lQ+dE99pFsb8osbJB3oRfE5eW4Hx6a/lZQr8Jh+eoT4=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@@ -287,6 +325,7 @@ grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJd
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
|
||||
|
||||
@@ -16,5 +16,5 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Println("my IP", n.IP)
|
||||
fmt.Println("my IP", n.Ip)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package config
|
||||
|
||||
type Config struct {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
// Router selects the best node for room interactions
|
||||
type Chooser interface {
|
||||
ChooseNodeForRoom(roomId string) (*proto.Node, error)
|
||||
GetNodeForRoom(roomId string) (*proto.Node, error)
|
||||
ClearRoom(roomId string) error
|
||||
}
|
||||
|
||||
func NewSingleNodeChooser(n *Node) *SingleNodeChooser {
|
||||
return &SingleNodeChooser{
|
||||
localNode: n,
|
||||
rooms: make(map[string]bool),
|
||||
}
|
||||
}
|
||||
|
||||
type SingleNodeChooser struct {
|
||||
localNode *Node
|
||||
rooms map[string]bool
|
||||
}
|
||||
|
||||
func (c *SingleNodeChooser) ChooseNodeForRoom(roomId string) (n *proto.Node, err error) {
|
||||
if c.rooms[roomId] {
|
||||
err = fmt.Errorf("Room already exists")
|
||||
return
|
||||
}
|
||||
c.rooms[roomId] = true
|
||||
n = &c.localNode.Node
|
||||
return
|
||||
}
|
||||
|
||||
func (c *SingleNodeChooser) GetNodeForRoom(roomId string) (*proto.Node, error) {
|
||||
if !c.rooms[roomId] {
|
||||
return nil, fmt.Errorf("room %d had not been created", roomId)
|
||||
}
|
||||
return &c.localNode.Node, nil
|
||||
}
|
||||
+7
-5
@@ -3,6 +3,8 @@ package node
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/pion/stun"
|
||||
|
||||
"github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -10,9 +12,7 @@ const (
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
ID string
|
||||
IP string
|
||||
Stats NodeStats
|
||||
proto.Node
|
||||
}
|
||||
|
||||
type NodeStats struct {
|
||||
@@ -29,7 +29,9 @@ func NewLocalNode() (*Node, error) {
|
||||
return nil, err
|
||||
}
|
||||
return &Node{
|
||||
ID: id.String(),
|
||||
proto.Node{
|
||||
Id: id.String(),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ func (n *Node) DiscoverNetworkInfo() error {
|
||||
stunErr = err
|
||||
return
|
||||
}
|
||||
n.IP = xorAddr.IP.String()
|
||||
n.Ip = xorAddr.IP.String()
|
||||
})
|
||||
|
||||
if stunErr != nil {
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/node"
|
||||
"github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
// A room service that supports a single node
|
||||
type SimpleRoomService struct {
|
||||
localNode *node.Node
|
||||
rooms map[string]bool
|
||||
}
|
||||
|
||||
func NewRoomService(localNode *node.Node) (svc *SimpleRoomService, err error) {
|
||||
svc = &SimpleRoomService{
|
||||
localNode: localNode,
|
||||
rooms: make(map[string]bool),
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (s *SimpleRoomService) CreateRoom(ctx context.Context, req *proto.CreateRoomRequest) (res *proto.CreateRoomResponse, err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (s *SimpleRoomService) JoinRoom(ctx context.Context, req *proto.JoinRoomRequest) (res *proto.JoinRoomResponse, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (s *SimpleRoomService) DeleteRoom(ctx context.Context, req *proto.DeleteRoomRequest) (res *proto.DeleteRoomResponse, err error) {
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: model.proto
|
||||
|
||||
package proto
|
||||
|
||||
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 Node struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||
Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
|
||||
Stats *NodeStats `protobuf:"bytes,4,opt,name=stats,proto3" json:"stats,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Node) Reset() { *m = Node{} }
|
||||
func (m *Node) String() string { return proto.CompactTextString(m) }
|
||||
func (*Node) ProtoMessage() {}
|
||||
func (*Node) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c16552f9fdb66d8, []int{0}
|
||||
}
|
||||
|
||||
func (m *Node) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Node.Unmarshal(m, b)
|
||||
}
|
||||
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 ""
|
||||
}
|
||||
|
||||
func (m *Node) GetIp() string {
|
||||
if m != nil {
|
||||
return m.Ip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Node) GetPort() int32 {
|
||||
if m != nil {
|
||||
return m.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Node) GetStats() *NodeStats {
|
||||
if m != nil {
|
||||
return m.Stats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type NodeStats struct {
|
||||
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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NodeStats) Reset() { *m = NodeStats{} }
|
||||
func (m *NodeStats) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeStats) ProtoMessage() {}
|
||||
func (*NodeStats) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c16552f9fdb66d8, []int{1}
|
||||
}
|
||||
|
||||
func (m *NodeStats) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodeStats.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
func (m *NodeStats) GetNumClients() int32 {
|
||||
if m != nil {
|
||||
return m.NumClients
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Node)(nil), "livekit.Node")
|
||||
proto.RegisterType((*NodeStats)(nil), "livekit.NodeStats")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) }
|
||||
|
||||
var fileDescriptor_4c16552f9fdb66d8 = []byte{
|
||||
// 214 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x8f, 0xbd, 0x4e, 0xc4, 0x30,
|
||||
0x10, 0x84, 0x95, 0x90, 0x00, 0xd9, 0x48, 0x14, 0x5b, 0x45, 0xa2, 0x20, 0xba, 0xca, 0x08, 0xe1,
|
||||
0x48, 0xf0, 0x06, 0x50, 0xd1, 0x50, 0x98, 0x8e, 0x06, 0xe5, 0xce, 0x16, 0x67, 0x11, 0x7b, 0x2d,
|
||||
0xff, 0xa4, 0xe0, 0xe9, 0x91, 0x9d, 0x88, 0xca, 0xfe, 0x66, 0x56, 0x33, 0xbb, 0xd0, 0x1b, 0x92,
|
||||
0x6a, 0xe1, 0xce, 0x53, 0x24, 0xbc, 0x5a, 0xf4, 0xaa, 0x7e, 0x74, 0x3c, 0x48, 0x68, 0xde, 0x49,
|
||||
0x2a, 0xbc, 0x81, 0x5a, 0xcb, 0xa1, 0x1a, 0x2b, 0xd6, 0x89, 0x5a, 0xcb, 0xc2, 0x6e, 0xa8, 0x77,
|
||||
0x76, 0x88, 0xd0, 0x38, 0xf2, 0x71, 0xb8, 0x18, 0x2b, 0xd6, 0x8a, 0xf2, 0x47, 0x06, 0x6d, 0x88,
|
||||
0x73, 0x0c, 0x43, 0x33, 0x56, 0xac, 0x7f, 0x42, 0xbe, 0x87, 0xf2, 0x9c, 0xf8, 0x91, 0x1d, 0xb1,
|
||||
0x0d, 0x1c, 0xde, 0xa0, 0xfb, 0xd7, 0xf0, 0x16, 0x3a, 0x9b, 0xcc, 0x97, 0x27, 0x32, 0xa1, 0x34,
|
||||
0xb6, 0xe2, 0xda, 0x26, 0x23, 0x32, 0xe3, 0x1d, 0xf4, 0xd9, 0x3c, 0x2d, 0x5a, 0xd9, 0x18, 0xca,
|
||||
0x02, 0xad, 0x00, 0x9b, 0xcc, 0xeb, 0xa6, 0xbc, 0x3c, 0x7c, 0xde, 0x7f, 0xeb, 0x78, 0x4e, 0x47,
|
||||
0x7e, 0x22, 0x33, 0xc9, 0x79, 0xd5, 0xf2, 0xf7, 0x3c, 0xd3, 0xb4, 0x77, 0x3f, 0x06, 0xe5, 0x57,
|
||||
0xe5, 0xa7, 0x72, 0xe6, 0xf1, 0xb2, 0x3c, 0xcf, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xeb,
|
||||
0xa9, 0x90, 0xfc, 0x00, 0x00, 0x00,
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package livekit;
|
||||
option go_package = "github.com/davidzhao/livekit-server/proto";
|
||||
|
||||
// internal types, declaring in proto to get serialization for free
|
||||
|
||||
|
||||
@@ -0,0 +1,558 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: service.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CreateRoomRequest struct {
|
||||
Room string `protobuf:"bytes,1,opt,name=room,proto3" json:"room,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) Reset() { *m = CreateRoomRequest{} }
|
||||
func (m *CreateRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateRoomRequest) ProtoMessage() {}
|
||||
func (*CreateRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{0}
|
||||
}
|
||||
|
||||
func (m *CreateRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CreateRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CreateRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_CreateRoomRequest.Size(m)
|
||||
}
|
||||
func (m *CreateRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CreateRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CreateRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *CreateRoomRequest) GetRoom() string {
|
||||
if m != nil {
|
||||
return m.Room
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateRoomResponse struct {
|
||||
Room string `protobuf:"bytes,1,opt,name=room,proto3" json:"room,omitempty"`
|
||||
NodeIp string `protobuf:"bytes,2,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty"`
|
||||
NodePort string `protobuf:"bytes,3,opt,name=node_port,json=nodePort,proto3" json:"node_port,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CreateRoomResponse) Reset() { *m = CreateRoomResponse{} }
|
||||
func (m *CreateRoomResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateRoomResponse) ProtoMessage() {}
|
||||
func (*CreateRoomResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{1}
|
||||
}
|
||||
|
||||
func (m *CreateRoomResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateRoomResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CreateRoomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CreateRoomResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CreateRoomResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CreateRoomResponse.Merge(m, src)
|
||||
}
|
||||
func (m *CreateRoomResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_CreateRoomResponse.Size(m)
|
||||
}
|
||||
func (m *CreateRoomResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CreateRoomResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CreateRoomResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *CreateRoomResponse) GetRoom() string {
|
||||
if m != nil {
|
||||
return m.Room
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateRoomResponse) GetNodeIp() string {
|
||||
if m != nil {
|
||||
return m.NodeIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateRoomResponse) GetNodePort() string {
|
||||
if m != nil {
|
||||
return m.NodePort
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type JoinRoomRequest struct {
|
||||
Room string `protobuf:"bytes,1,opt,name=room,proto3" json:"room,omitempty"`
|
||||
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *JoinRoomRequest) Reset() { *m = JoinRoomRequest{} }
|
||||
func (m *JoinRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinRoomRequest) ProtoMessage() {}
|
||||
func (*JoinRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{2}
|
||||
}
|
||||
|
||||
func (m *JoinRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *JoinRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_JoinRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *JoinRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_JoinRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *JoinRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_JoinRoomRequest.Size(m)
|
||||
}
|
||||
func (m *JoinRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_JoinRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_JoinRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *JoinRoomRequest) GetRoom() string {
|
||||
if m != nil {
|
||||
return m.Room
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRoomRequest) GetClientId() string {
|
||||
if m != nil {
|
||||
return m.ClientId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type JoinRoomResponse struct {
|
||||
NodeIp string `protobuf:"bytes,1,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty"`
|
||||
NodePort string `protobuf:"bytes,2,opt,name=node_port,json=nodePort,proto3" json:"node_port,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *JoinRoomResponse) Reset() { *m = JoinRoomResponse{} }
|
||||
func (m *JoinRoomResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinRoomResponse) ProtoMessage() {}
|
||||
func (*JoinRoomResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{3}
|
||||
}
|
||||
|
||||
func (m *JoinRoomResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinRoomResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *JoinRoomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_JoinRoomResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *JoinRoomResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_JoinRoomResponse.Merge(m, src)
|
||||
}
|
||||
func (m *JoinRoomResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_JoinRoomResponse.Size(m)
|
||||
}
|
||||
func (m *JoinRoomResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_JoinRoomResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_JoinRoomResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *JoinRoomResponse) GetNodeIp() string {
|
||||
if m != nil {
|
||||
return m.NodeIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRoomResponse) GetNodePort() string {
|
||||
if m != nil {
|
||||
return m.NodePort
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteRoomRequest struct {
|
||||
Room string `protobuf:"bytes,1,opt,name=room,proto3" json:"room,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DeleteRoomRequest) Reset() { *m = DeleteRoomRequest{} }
|
||||
func (m *DeleteRoomRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRoomRequest) ProtoMessage() {}
|
||||
func (*DeleteRoomRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{4}
|
||||
}
|
||||
|
||||
func (m *DeleteRoomRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DeleteRoomRequest.Merge(m, src)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_DeleteRoomRequest.Size(m)
|
||||
}
|
||||
func (m *DeleteRoomRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DeleteRoomRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DeleteRoomRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *DeleteRoomRequest) GetRoom() string {
|
||||
if m != nil {
|
||||
return m.Room
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteRoomResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DeleteRoomResponse) Reset() { *m = DeleteRoomResponse{} }
|
||||
func (m *DeleteRoomResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRoomResponse) ProtoMessage() {}
|
||||
func (*DeleteRoomResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{5}
|
||||
}
|
||||
|
||||
func (m *DeleteRoomResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DeleteRoomResponse.Merge(m, src)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_DeleteRoomResponse.Size(m)
|
||||
}
|
||||
func (m *DeleteRoomResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DeleteRoomResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DeleteRoomResponse proto.InternalMessageInfo
|
||||
|
||||
type SignalRequest struct {
|
||||
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_a0b84a42fa06f626, []int{6}
|
||||
}
|
||||
|
||||
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 SignalResponse struct {
|
||||
// Types that are valid to be assigned to Payload:
|
||||
// *SignalResponse_Desc
|
||||
// *SignalResponse_Trickle
|
||||
Payload isSignalResponse_Payload `protobuf_oneof:"payload"`
|
||||
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_a0b84a42fa06f626, []int{7}
|
||||
}
|
||||
|
||||
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_Payload interface {
|
||||
isSignalResponse_Payload()
|
||||
}
|
||||
|
||||
type SignalResponse_Desc struct {
|
||||
Desc *SessionDescription `protobuf:"bytes,1,opt,name=desc,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalResponse_Trickle struct {
|
||||
Trickle *TrickleRequest `protobuf:"bytes,2,opt,name=trickle,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*SignalResponse_Desc) isSignalResponse_Payload() {}
|
||||
|
||||
func (*SignalResponse_Trickle) isSignalResponse_Payload() {}
|
||||
|
||||
func (m *SignalResponse) GetPayload() isSignalResponse_Payload {
|
||||
if m != nil {
|
||||
return m.Payload
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalResponse) GetDesc() *SessionDescription {
|
||||
if x, ok := m.GetPayload().(*SignalResponse_Desc); ok {
|
||||
return x.Desc
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignalResponse) GetTrickle() *TrickleRequest {
|
||||
if x, ok := m.GetPayload().(*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_Desc)(nil),
|
||||
(*SignalResponse_Trickle)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
type TrickleRequest struct {
|
||||
Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *TrickleRequest) Reset() { *m = TrickleRequest{} }
|
||||
func (m *TrickleRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*TrickleRequest) ProtoMessage() {}
|
||||
func (*TrickleRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{8}
|
||||
}
|
||||
|
||||
func (m *TrickleRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TrickleRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_TrickleRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_TrickleRequest.Merge(m, src)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_TrickleRequest.Size(m)
|
||||
}
|
||||
func (m *TrickleRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_TrickleRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_TrickleRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *TrickleRequest) GetCandidate() string {
|
||||
if m != nil {
|
||||
return m.Candidate
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TrickleResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *TrickleResponse) Reset() { *m = TrickleResponse{} }
|
||||
func (m *TrickleResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*TrickleResponse) ProtoMessage() {}
|
||||
func (*TrickleResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{9}
|
||||
}
|
||||
|
||||
func (m *TrickleResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TrickleResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_TrickleResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_TrickleResponse.Merge(m, src)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_TrickleResponse.Size(m)
|
||||
}
|
||||
func (m *TrickleResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_TrickleResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_TrickleResponse proto.InternalMessageInfo
|
||||
|
||||
type SessionDescription struct {
|
||||
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Sdp []byte `protobuf:"bytes,2,opt,name=sdp,proto3" json:"sdp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SessionDescription) Reset() { *m = SessionDescription{} }
|
||||
func (m *SessionDescription) String() string { return proto.CompactTextString(m) }
|
||||
func (*SessionDescription) ProtoMessage() {}
|
||||
func (*SessionDescription) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a0b84a42fa06f626, []int{10}
|
||||
}
|
||||
|
||||
func (m *SessionDescription) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SessionDescription.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SessionDescription.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SessionDescription.Merge(m, src)
|
||||
}
|
||||
func (m *SessionDescription) XXX_Size() int {
|
||||
return xxx_messageInfo_SessionDescription.Size(m)
|
||||
}
|
||||
func (m *SessionDescription) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SessionDescription.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SessionDescription proto.InternalMessageInfo
|
||||
|
||||
func (m *SessionDescription) GetType() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SessionDescription) GetSdp() []byte {
|
||||
if m != nil {
|
||||
return m.Sdp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CreateRoomRequest)(nil), "livekit.CreateRoomRequest")
|
||||
proto.RegisterType((*CreateRoomResponse)(nil), "livekit.CreateRoomResponse")
|
||||
proto.RegisterType((*JoinRoomRequest)(nil), "livekit.JoinRoomRequest")
|
||||
proto.RegisterType((*JoinRoomResponse)(nil), "livekit.JoinRoomResponse")
|
||||
proto.RegisterType((*DeleteRoomRequest)(nil), "livekit.DeleteRoomRequest")
|
||||
proto.RegisterType((*DeleteRoomResponse)(nil), "livekit.DeleteRoomResponse")
|
||||
proto.RegisterType((*SignalRequest)(nil), "livekit.SignalRequest")
|
||||
proto.RegisterType((*SignalResponse)(nil), "livekit.SignalResponse")
|
||||
proto.RegisterType((*TrickleRequest)(nil), "livekit.TrickleRequest")
|
||||
proto.RegisterType((*TrickleResponse)(nil), "livekit.TrickleResponse")
|
||||
proto.RegisterType((*SessionDescription)(nil), "livekit.SessionDescription")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) }
|
||||
|
||||
var fileDescriptor_a0b84a42fa06f626 = []byte{
|
||||
// 494 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xc1, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xad, 0xdb, 0x12, 0x27, 0x13, 0xda, 0x34, 0x23, 0x44, 0x8c, 0xc3, 0x01, 0xf9, 0x52, 0x10,
|
||||
0xc2, 0x81, 0xf4, 0x06, 0x48, 0x88, 0xb4, 0x95, 0x52, 0x2e, 0x20, 0xa7, 0x27, 0x0e, 0x54, 0xae,
|
||||
0x77, 0xda, 0xae, 0xea, 0x78, 0xcd, 0x7a, 0x1b, 0xa9, 0x5c, 0xf9, 0x3b, 0xbe, 0x81, 0x8f, 0x41,
|
||||
0x5e, 0xaf, 0x63, 0x53, 0xa7, 0xcd, 0xc9, 0xeb, 0x37, 0x6f, 0x66, 0xdf, 0xcc, 0x3c, 0x2d, 0xec,
|
||||
0x64, 0x24, 0x17, 0x3c, 0x22, 0x3f, 0x95, 0x42, 0x09, 0xb4, 0x63, 0xbe, 0xa0, 0x6b, 0xae, 0xbc,
|
||||
0x7d, 0xe8, 0x1f, 0x4a, 0x0a, 0x15, 0x05, 0x42, 0xcc, 0x03, 0xfa, 0x79, 0x43, 0x99, 0x42, 0x84,
|
||||
0x6d, 0x29, 0xc4, 0xdc, 0xb1, 0x5e, 0x58, 0x2f, 0x3b, 0x81, 0x3e, 0x7b, 0x3f, 0x00, 0xeb, 0xc4,
|
||||
0x2c, 0x15, 0x49, 0x46, 0xab, 0x98, 0x38, 0x00, 0x3b, 0x11, 0x8c, 0xce, 0x78, 0xea, 0x6c, 0x6a,
|
||||
0xb8, 0x95, 0xff, 0x9e, 0xa4, 0x38, 0x84, 0x8e, 0x0e, 0xa4, 0x42, 0x2a, 0x67, 0x4b, 0x87, 0xda,
|
||||
0x39, 0xf0, 0x4d, 0x48, 0xe5, 0x4d, 0xa0, 0xf7, 0x45, 0xf0, 0x64, 0x8d, 0x8c, 0xbc, 0x46, 0x14,
|
||||
0x73, 0x4a, 0xd4, 0x19, 0x67, 0xa6, 0x7c, 0xbb, 0x00, 0x4e, 0x98, 0x37, 0x85, 0xbd, 0xaa, 0x86,
|
||||
0x51, 0x58, 0x53, 0x63, 0xdd, 0xaf, 0x66, 0xf3, 0x8e, 0x9a, 0x7d, 0xe8, 0x1f, 0x51, 0x4c, 0xeb,
|
||||
0xc7, 0xf2, 0x04, 0xb0, 0x4e, 0x2c, 0x2e, 0xf5, 0x7a, 0xb0, 0x33, 0xe3, 0x97, 0x49, 0x18, 0x9b,
|
||||
0x54, 0xef, 0xb7, 0x05, 0xbb, 0x25, 0x62, 0x84, 0xbd, 0x83, 0x6d, 0x46, 0x59, 0xa4, 0xab, 0x75,
|
||||
0xc7, 0x43, 0xdf, 0x6c, 0xc4, 0x9f, 0x51, 0x96, 0x71, 0x91, 0x1c, 0x51, 0x16, 0x49, 0x9e, 0x2a,
|
||||
0x2e, 0x92, 0xe9, 0x46, 0xa0, 0xa9, 0x78, 0x00, 0xb6, 0x92, 0x3c, 0xba, 0x8e, 0x49, 0x0b, 0xee,
|
||||
0x8e, 0x07, 0xcb, 0xac, 0xd3, 0x02, 0x37, 0xf7, 0x4d, 0x37, 0x82, 0x92, 0x39, 0xe9, 0x80, 0x9d,
|
||||
0x86, 0xb7, 0xb1, 0x08, 0x99, 0xe7, 0xc3, 0xee, 0xff, 0x3c, 0x7c, 0x0e, 0x9d, 0x28, 0x4c, 0x18,
|
||||
0x67, 0xa1, 0x22, 0xd3, 0x57, 0x05, 0x78, 0x7d, 0xe8, 0x2d, 0xf9, 0xa6, 0xb3, 0xf7, 0x80, 0x4d,
|
||||
0x81, 0xf9, 0x64, 0xd4, 0x6d, 0x5a, 0x56, 0xd0, 0x67, 0xdc, 0x83, 0xad, 0x8c, 0x15, 0x16, 0x78,
|
||||
0x1c, 0xe4, 0xc7, 0xf1, 0x5f, 0x0b, 0xba, 0xf9, 0x98, 0x66, 0x85, 0x15, 0xf1, 0x18, 0xa0, 0xb2,
|
||||
0x14, 0xba, 0xcb, 0x5e, 0x1a, 0x86, 0x74, 0x87, 0x2b, 0x63, 0x66, 0x90, 0x9f, 0xa0, 0x5d, 0x6e,
|
||||
0x1d, 0x9d, 0x25, 0xf1, 0x8e, 0x99, 0xdc, 0x67, 0x2b, 0x22, 0xa6, 0xc0, 0x31, 0x40, 0xb5, 0xc3,
|
||||
0x9a, 0x8e, 0x86, 0x03, 0x6a, 0x3a, 0x9a, 0x4b, 0x1f, 0xff, 0xb1, 0x00, 0x82, 0xd3, 0xc3, 0xb2,
|
||||
0xbb, 0xcf, 0xf0, 0xe8, 0xeb, 0xc5, 0x05, 0x49, 0x7c, 0x68, 0xb5, 0xee, 0x43, 0x41, 0xfc, 0x00,
|
||||
0xad, 0xc2, 0x34, 0xf8, 0xb4, 0xa2, 0xd5, 0x7d, 0xe5, 0x0e, 0x1a, 0x78, 0x21, 0xe6, 0xad, 0x85,
|
||||
0x1f, 0xc1, 0x36, 0xcb, 0xc3, 0xfb, 0x6c, 0xe2, 0x3a, 0xcd, 0x40, 0x91, 0x3f, 0x79, 0xfd, 0xfd,
|
||||
0xd5, 0x25, 0x57, 0x57, 0x37, 0xe7, 0x7e, 0x24, 0xe6, 0x23, 0x16, 0x2e, 0x38, 0xfb, 0x75, 0x15,
|
||||
0x8a, 0x91, 0xe1, 0xbf, 0xc9, 0x9f, 0x13, 0x92, 0x23, 0xfd, 0x9a, 0x9c, 0xb7, 0xf4, 0xe7, 0xe0,
|
||||
0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0xc2, 0x15, 0x13, 0x65, 0x04, 0x00, 0x00,
|
||||
}
|
||||
+6
-2
@@ -1,6 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package livekit;
|
||||
option go_package = "github.com/davidzhao/livekit-server/proto";
|
||||
|
||||
|
||||
// Room service that can be performed on any node
|
||||
service RoomService {
|
||||
@@ -12,11 +14,13 @@ service RoomService {
|
||||
}
|
||||
|
||||
message CreateRoomRequest {
|
||||
|
||||
string room = 1;
|
||||
}
|
||||
|
||||
message CreateRoomResponse {
|
||||
|
||||
string room = 1;
|
||||
string node_ip = 2;
|
||||
string node_port = 3;
|
||||
}
|
||||
|
||||
message JoinRoomRequest {
|
||||
|
||||
@@ -0,0 +1,358 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package proto
|
||||
|
||||
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
|
||||
|
||||
// RoomServiceClient is the client API for RoomService 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 RoomServiceClient interface {
|
||||
// TODO: how do we secure room service?
|
||||
// should be accessible to only internal servers, not external
|
||||
CreateRoom(ctx context.Context, in *CreateRoomRequest, opts ...grpc.CallOption) (*CreateRoomResponse, error)
|
||||
JoinRoom(ctx context.Context, in *JoinRoomRequest, opts ...grpc.CallOption) (*JoinRoomResponse, error)
|
||||
DeleteRoom(ctx context.Context, in *DeleteRoomRequest, opts ...grpc.CallOption) (*DeleteRoomResponse, error)
|
||||
}
|
||||
|
||||
type roomServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRoomServiceClient(cc grpc.ClientConnInterface) RoomServiceClient {
|
||||
return &roomServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *roomServiceClient) CreateRoom(ctx context.Context, in *CreateRoomRequest, opts ...grpc.CallOption) (*CreateRoomResponse, error) {
|
||||
out := new(CreateRoomResponse)
|
||||
err := c.cc.Invoke(ctx, "/livekit.RoomService/CreateRoom", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roomServiceClient) JoinRoom(ctx context.Context, in *JoinRoomRequest, opts ...grpc.CallOption) (*JoinRoomResponse, error) {
|
||||
out := new(JoinRoomResponse)
|
||||
err := c.cc.Invoke(ctx, "/livekit.RoomService/JoinRoom", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roomServiceClient) DeleteRoom(ctx context.Context, in *DeleteRoomRequest, opts ...grpc.CallOption) (*DeleteRoomResponse, error) {
|
||||
out := new(DeleteRoomResponse)
|
||||
err := c.cc.Invoke(ctx, "/livekit.RoomService/DeleteRoom", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RoomServiceServer is the server API for RoomService service.
|
||||
// All implementations must embed UnimplementedRoomServiceServer
|
||||
// for forward compatibility
|
||||
type RoomServiceServer interface {
|
||||
// TODO: how do we secure room service?
|
||||
// should be accessible to only internal servers, not external
|
||||
CreateRoom(context.Context, *CreateRoomRequest) (*CreateRoomResponse, error)
|
||||
JoinRoom(context.Context, *JoinRoomRequest) (*JoinRoomResponse, error)
|
||||
DeleteRoom(context.Context, *DeleteRoomRequest) (*DeleteRoomResponse, error)
|
||||
mustEmbedUnimplementedRoomServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedRoomServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRoomServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRoomServiceServer) CreateRoom(context.Context, *CreateRoomRequest) (*CreateRoomResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateRoom not implemented")
|
||||
}
|
||||
func (UnimplementedRoomServiceServer) JoinRoom(context.Context, *JoinRoomRequest) (*JoinRoomResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method JoinRoom not implemented")
|
||||
}
|
||||
func (UnimplementedRoomServiceServer) DeleteRoom(context.Context, *DeleteRoomRequest) (*DeleteRoomResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteRoom not implemented")
|
||||
}
|
||||
func (UnimplementedRoomServiceServer) mustEmbedUnimplementedRoomServiceServer() {}
|
||||
|
||||
// UnsafeRoomServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RoomServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRoomServiceServer interface {
|
||||
mustEmbedUnimplementedRoomServiceServer()
|
||||
}
|
||||
|
||||
func RegisterRoomServiceServer(s *grpc.Server, srv RoomServiceServer) {
|
||||
s.RegisterService(&_RoomService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RoomService_CreateRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateRoomRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoomServiceServer).CreateRoom(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/livekit.RoomService/CreateRoom",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoomServiceServer).CreateRoom(ctx, req.(*CreateRoomRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoomService_JoinRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(JoinRoomRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoomServiceServer).JoinRoom(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/livekit.RoomService/JoinRoom",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoomServiceServer).JoinRoom(ctx, req.(*JoinRoomRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoomService_DeleteRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteRoomRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoomServiceServer).DeleteRoom(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/livekit.RoomService/DeleteRoom",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoomServiceServer).DeleteRoom(ctx, req.(*DeleteRoomRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RoomService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "livekit.RoomService",
|
||||
HandlerType: (*RoomServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateRoom",
|
||||
Handler: _RoomService_CreateRoom_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "JoinRoom",
|
||||
Handler: _RoomService_JoinRoom_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteRoom",
|
||||
Handler: _RoomService_DeleteRoom_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service.proto",
|
||||
}
|
||||
|
||||
// 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 {
|
||||
Offer(ctx context.Context, in *SessionDescription, opts ...grpc.CallOption) (*SessionDescription, error)
|
||||
// push channel to allow server to push commands to client
|
||||
Signal(ctx context.Context, in *SignalRequest, opts ...grpc.CallOption) (RTCService_SignalClient, error)
|
||||
Trickle(ctx context.Context, in *TrickleRequest, opts ...grpc.CallOption) (*TrickleResponse, error)
|
||||
}
|
||||
|
||||
type rTCServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRTCServiceClient(cc grpc.ClientConnInterface) RTCServiceClient {
|
||||
return &rTCServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *rTCServiceClient) Offer(ctx context.Context, in *SessionDescription, opts ...grpc.CallOption) (*SessionDescription, error) {
|
||||
out := new(SessionDescription)
|
||||
err := c.cc.Invoke(ctx, "/livekit.RTCService/Offer", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rTCServiceClient) Signal(ctx context.Context, in *SignalRequest, 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}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type RTCService_SignalClient interface {
|
||||
Recv() (*SignalResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type rTCServiceSignalClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *rTCServiceSignalClient) Recv() (*SignalResponse, error) {
|
||||
m := new(SignalResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *rTCServiceClient) Trickle(ctx context.Context, in *TrickleRequest, opts ...grpc.CallOption) (*TrickleResponse, error) {
|
||||
out := new(TrickleResponse)
|
||||
err := c.cc.Invoke(ctx, "/livekit.RTCService/Trickle", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RTCServiceServer is the server API for RTCService service.
|
||||
// All implementations must embed UnimplementedRTCServiceServer
|
||||
// for forward compatibility
|
||||
type RTCServiceServer interface {
|
||||
Offer(context.Context, *SessionDescription) (*SessionDescription, error)
|
||||
// push channel to allow server to push commands to client
|
||||
Signal(*SignalRequest, RTCService_SignalServer) error
|
||||
Trickle(context.Context, *TrickleRequest) (*TrickleResponse, error)
|
||||
mustEmbedUnimplementedRTCServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedRTCServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRTCServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRTCServiceServer) Offer(context.Context, *SessionDescription) (*SessionDescription, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Offer not implemented")
|
||||
}
|
||||
func (UnimplementedRTCServiceServer) Signal(*SignalRequest, RTCService_SignalServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Signal not implemented")
|
||||
}
|
||||
func (UnimplementedRTCServiceServer) Trickle(context.Context, *TrickleRequest) (*TrickleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Trickle 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_Offer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SessionDescription)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RTCServiceServer).Offer(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/livekit.RTCService/Offer",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RTCServiceServer).Offer(ctx, req.(*SessionDescription))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RTCService_Signal_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SignalRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RTCServiceServer).Signal(m, &rTCServiceSignalServer{stream})
|
||||
}
|
||||
|
||||
type RTCService_SignalServer interface {
|
||||
Send(*SignalResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type rTCServiceSignalServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *rTCServiceSignalServer) Send(m *SignalResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _RTCService_Trickle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TrickleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RTCServiceServer).Trickle(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/livekit.RTCService/Trickle",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RTCServiceServer).Trickle(ctx, req.(*TrickleRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RTCService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "livekit.RTCService",
|
||||
HandlerType: (*RTCServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Offer",
|
||||
Handler: _RTCService_Offer_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Trickle",
|
||||
Handler: _RTCService_Trickle_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Signal",
|
||||
Handler: _RTCService_Signal_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "service.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user