This repository has been archived by the owner on Dec 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f17aec
commit d6d4660
Showing
5 changed files
with
190 additions
and
47 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
syntax = "proto3"; | ||
|
||
import "media.proto"; | ||
|
||
option go_package = "github.com/pion/ion/pkg/proto"; | ||
|
||
package biz; | ||
|
||
service Biz { | ||
rpc Join(JoinRequest) returns (stream JoinReply); | ||
} | ||
|
||
message Peer { | ||
string uid = 1; | ||
string name = 2; | ||
bytes info = 4; | ||
} | ||
|
||
message Message { | ||
string from = 1; // uid | ||
string to = 2; // uid | ||
bytes data = 3; | ||
} | ||
|
||
message Join { | ||
string sid = 1; | ||
string token = 2; | ||
Peer peer = 3; | ||
} | ||
|
||
message Leave { | ||
int32 code = 1; | ||
string reason = 2; | ||
} | ||
|
||
message JoinRequest { | ||
oneof payload { | ||
Join join = 1; | ||
Leave leave = 2; | ||
Message msg = 4; | ||
} | ||
} | ||
|
||
message Result { | ||
enum Status { | ||
JoinSuccess = 0; | ||
JoinFailed = 1; | ||
} | ||
Status status = 2; | ||
string reason = 3; | ||
} | ||
|
||
message PeerJoin { | ||
Peer peer = 1; | ||
} | ||
|
||
message PeerLeave { | ||
Peer peer = 1; | ||
int32 code = 2; | ||
string reason = 3; | ||
} | ||
|
||
message Stream { | ||
enum State { | ||
ADD = 0; | ||
UPDATE = 1; | ||
REMOVE = 2; | ||
} | ||
Peer peer = 3; | ||
State state = 4; | ||
Stream stream = 5; | ||
} | ||
|
||
message JoinReply { | ||
oneof payload { | ||
Result result = 1; | ||
PeerJoin join = 2; | ||
PeerLeave leave = 3; | ||
Stream stream = 4; | ||
Message msg = 5; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
syntax = "proto3"; | ||
|
||
import "media.proto"; | ||
|
||
option go_package = "github.com/pion/ion/pkg/proto"; | ||
|
||
package islb; | ||
|
||
service ISLB { | ||
rpc FindNode(FindNodeRequest) returns (FindNodeRequest) {} | ||
rpc PublishSessionState(stream SessionState) returns (Empty){} | ||
} | ||
|
||
message FindNodeRequest { | ||
oneof condition { | ||
string sid = 1; | ||
string nid = 2; | ||
NodeType type = 3; | ||
} | ||
} | ||
|
||
message FindNodeRequest { | ||
repeated Node node = 1; | ||
} | ||
|
||
enum NodeType { | ||
SFU = 0; | ||
AVP = 2; | ||
GW = 3; | ||
} | ||
|
||
message Node { | ||
string nid = 1; | ||
NodeType type = 5; | ||
} | ||
|
||
message Empty {} | ||
|
||
message SessionState { | ||
Node node = 1; | ||
enum State { | ||
NEW = 2; | ||
UPDATE = 3; | ||
DELETE = 4; | ||
} | ||
State state = 5; | ||
Session session = 6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
syntax = "proto3"; | ||
|
||
option go_package = "github.com/pion/ion/pkg/proto"; | ||
|
||
package rtc; | ||
|
||
service RTC { | ||
rpc Signal(stream Signalling) returns (stream Signalling) {} | ||
} | ||
|
||
message Parameter { | ||
key_type key = 1; | ||
value_type value = 2; | ||
} | ||
|
||
message Join { | ||
string sid = 1; | ||
string uid = 2; | ||
repeated Parameter parameters = 3; | ||
} | ||
|
||
message Signalling { | ||
oneof payload { | ||
Join join = 1; | ||
Description description = 2; | ||
Trickle trickle = 3; | ||
Error error = 4; | ||
} | ||
} | ||
|
||
enum Target { | ||
PUBLISHER = 0; | ||
SUBSCRIBER = 1; | ||
} | ||
|
||
message Description { | ||
Target target = 1; | ||
bytes description = 2; | ||
} | ||
|
||
message Trickle { | ||
Target target = 1; | ||
bytes candidate = 2; | ||
} | ||
|
||
message Error { | ||
int32 code = 1; | ||
string reason = 2; | ||
} |