switched to Twirp for RPC, server skaffold
This commit is contained in:
+18
-17
@@ -23,7 +23,7 @@ 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"`
|
||||
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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@@ -69,9 +69,9 @@ func (m *Node) GetIp() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Node) GetPort() int32 {
|
||||
func (m *Node) GetRtcPort() uint32 {
|
||||
if m != nil {
|
||||
return m.Port
|
||||
return m.RtcPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -138,18 +138,19 @@ func init() {
|
||||
func init() { proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) }
|
||||
|
||||
var fileDescriptor_4c16552f9fdb66d8 = []byte{
|
||||
// 206 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x4f, 0xbb, 0x4e, 0xc4, 0x30,
|
||||
0x10, 0x54, 0x42, 0x0c, 0x64, 0x23, 0x51, 0x6c, 0x65, 0x89, 0x82, 0xe8, 0x1a, 0x4c, 0x81, 0x4f,
|
||||
0x82, 0x3f, 0x80, 0x8a, 0x86, 0xc2, 0x74, 0x34, 0x88, 0x3b, 0x5b, 0x60, 0x11, 0x7b, 0x2d, 0x3f,
|
||||
0xee, 0xfb, 0x91, 0x9d, 0x40, 0x35, 0x3b, 0x33, 0xab, 0x99, 0x5d, 0x98, 0x1c, 0x69, 0xb3, 0xc8,
|
||||
0x10, 0x29, 0x13, 0x5e, 0x2c, 0xf6, 0x64, 0x7e, 0x6c, 0xde, 0x69, 0x18, 0x5e, 0x49, 0x1b, 0xbc,
|
||||
0x82, 0xde, 0x6a, 0xde, 0xcd, 0x9d, 0x18, 0x55, 0x6f, 0x75, 0xe3, 0x81, 0xf7, 0x1b, 0x0f, 0x88,
|
||||
0x30, 0x04, 0x8a, 0x99, 0x9f, 0xcd, 0x9d, 0x60, 0xaa, 0xcd, 0x28, 0x80, 0xa5, 0xfc, 0x99, 0x13,
|
||||
0x1f, 0xe6, 0x4e, 0x4c, 0x0f, 0x28, 0xb7, 0x50, 0x59, 0x13, 0xdf, 0xaa, 0xa3, 0xd6, 0x85, 0xdd,
|
||||
0x0b, 0x8c, 0xff, 0x1a, 0x5e, 0xc3, 0xe8, 0x8b, 0xfb, 0x88, 0x44, 0x2e, 0xb5, 0x46, 0xa6, 0x2e,
|
||||
0x7d, 0x71, 0xaa, 0x72, 0xbc, 0x81, 0xa9, 0x9a, 0xc7, 0xc5, 0x1a, 0x9f, 0x53, 0x3b, 0x80, 0x29,
|
||||
0xf0, 0xc5, 0x3d, 0xaf, 0xca, 0xd3, 0xdd, 0xfb, 0xed, 0x97, 0xcd, 0xdf, 0xe5, 0x20, 0x8f, 0xe4,
|
||||
0xf6, 0x5b, 0xe3, 0x1f, 0xde, 0x27, 0x13, 0x4f, 0x26, 0xee, 0xdb, 0x93, 0x87, 0xf3, 0x06, 0x8f,
|
||||
0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x8d, 0x0e, 0xc7, 0xfa, 0x00, 0x00, 0x00,
|
||||
// 216 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x8f, 0x31, 0x4f, 0xc3, 0x30,
|
||||
0x10, 0x85, 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||
0x34, 0x9d, 0x34, 0xed, 0xf2, 0xad, 0x87, 0xcb, 0x2c, 0xcf, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff,
|
||||
0x52, 0x03, 0x38, 0xe7, 0x01, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,14 +1,14 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package livekit;
|
||||
option go_package = "github.com/livekit/livekit-server/proto";
|
||||
option go_package = "livekit";
|
||||
|
||||
// internal types, declaring in proto to get serialization for free
|
||||
|
||||
message Node {
|
||||
string id = 1;
|
||||
string ip = 2;
|
||||
int32 port = 3;
|
||||
uint32 rtc_port = 3;
|
||||
NodeStats stats = 4;
|
||||
}
|
||||
|
||||
|
||||
+39
-40
@@ -62,7 +62,7 @@ func (m *CreateRoomRequest) GetRoom() string {
|
||||
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"`
|
||||
NodeRtcPort uint32 `protobuf:"varint,3,opt,name=node_rtc_port,json=nodeRtcPort,proto3" json:"node_rtc_port,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -107,11 +107,11 @@ func (m *CreateRoomResponse) GetNodeIp() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateRoomResponse) GetNodePort() string {
|
||||
func (m *CreateRoomResponse) GetNodeRtcPort() uint32 {
|
||||
if m != nil {
|
||||
return m.NodePort
|
||||
return m.NodeRtcPort
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type JoinRoomRequest struct {
|
||||
@@ -163,7 +163,7 @@ func (m *JoinRoomRequest) GetClientId() string {
|
||||
|
||||
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"`
|
||||
NodeRtcPort uint32 `protobuf:"varint,2,opt,name=node_rtc_port,json=nodeRtcPort,proto3" json:"node_rtc_port,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -201,11 +201,11 @@ func (m *JoinRoomResponse) GetNodeIp() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *JoinRoomResponse) GetNodePort() string {
|
||||
func (m *JoinRoomResponse) GetNodeRtcPort() uint32 {
|
||||
if m != nil {
|
||||
return m.NodePort
|
||||
return m.NodeRtcPort
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeleteRoomRequest struct {
|
||||
@@ -523,36 +523,35 @@ func init() {
|
||||
func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) }
|
||||
|
||||
var fileDescriptor_a0b84a42fa06f626 = []byte{
|
||||
// 487 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0xad, 0xdb, 0x12, 0x27, 0x13, 0xda, 0x34, 0x23, 0x44, 0x8c, 0xc3, 0x01, 0xf9, 0x12, 0x38,
|
||||
0xe0, 0x42, 0x7a, 0x03, 0x24, 0x44, 0xda, 0x4a, 0x29, 0x17, 0x90, 0xd3, 0x13, 0x07, 0x2a, 0xd7,
|
||||
0x9e, 0x96, 0x55, 0x1d, 0xaf, 0xd9, 0xdd, 0x56, 0xea, 0x99, 0x7f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, 0xf8, 0xd8, 0x6a, 0xdd, 0xc7, 0x82, 0xf8, 0x11, 0x3a,
|
||||
0x85, 0x69, 0xf0, 0x79, 0x4d, 0x6b, 0xfa, 0xca, 0x1d, 0xb5, 0xf0, 0x42, 0xcc, 0x3b, 0x0b, 0x3f,
|
||||
0x81, 0x6d, 0x96, 0x87, 0x0f, 0xd9, 0xc4, 0x75, 0xda, 0x81, 0x22, 0x7f, 0xf6, 0xe6, 0xc7, 0xe4,
|
||||
0x92, 0xa9, 0x5f, 0xd7, 0xe7, 0x7e, 0xc4, 0x97, 0xfb, 0x86, 0x55, 0x7e, 0xdf, 0xe6, 0x8f, 0x09,
|
||||
0x89, 0x7d, 0xfd, 0x96, 0x9c, 0x77, 0xf4, 0xe7, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xed,
|
||||
0x7b, 0x97, 0xdb, 0x63, 0x04, 0x00, 0x00,
|
||||
// 475 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xc1, 0x4e, 0xdb, 0x40,
|
||||
0x10, 0xc5, 0x40, 0x31, 0x99, 0x34, 0x84, 0x8c, 0x2a, 0xe1, 0x3a, 0x3d, 0x20, 0x5f, 0x42, 0x0f,
|
||||
0x35, 0x6a, 0xb8, 0x55, 0x95, 0xaa, 0x06, 0x90, 0xa0, 0x17, 0xaa, 0x0d, 0xa7, 0x5e, 0x22, 0xb3,
|
||||
0x1e, 0xe8, 0x0a, 0xc7, 0xeb, 0xee, 0x2e, 0x48, 0x9c, 0x7b, 0xee, 0x1f, 0xf6, 0x63, 0x2a, 0xaf,
|
||||
0xd7, 0x89, 0x5b, 0xa7, 0xe1, 0xe4, 0xf5, 0xcc, 0xdb, 0x99, 0x37, 0xf3, 0x9e, 0x16, 0x7a, 0x9a,
|
||||
0xd4, 0xa3, 0xe0, 0x14, 0x17, 0x4a, 0x1a, 0x89, 0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ee, 0x84, 0xf9, 0xfe, 0x70, 0x13, 0x73, 0x39, 0x3f, 0x76, 0xa8, 0xfa,
|
||||
0xfb, 0xae, 0x7c, 0x1d, 0x48, 0x1d, 0xdb, 0xc7, 0xe1, 0x66, 0xc7, 0x7e, 0x4e, 0xfe, 0x04, 0x00,
|
||||
0x00, 0xff, 0xff, 0x3b, 0x56, 0x68, 0x37, 0x34, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package livekit;
|
||||
option go_package = "github.com/livekit/livekit-server/proto";
|
||||
option go_package = "livekit";
|
||||
|
||||
|
||||
// Room service that can be performed on any node
|
||||
@@ -20,7 +20,7 @@ message CreateRoomRequest {
|
||||
message CreateRoomResponse {
|
||||
string room = 1;
|
||||
string node_ip = 2;
|
||||
string node_port = 3;
|
||||
uint32 node_rtc_port = 3;
|
||||
}
|
||||
|
||||
message JoinRoomRequest {
|
||||
@@ -30,7 +30,7 @@ message JoinRoomRequest {
|
||||
|
||||
message JoinRoomResponse {
|
||||
string node_ip = 1;
|
||||
string node_port = 2;
|
||||
uint32 node_rtc_port = 2;
|
||||
}
|
||||
|
||||
message DeleteRoomRequest {
|
||||
@@ -42,10 +42,13 @@ message DeleteRoomResponse {
|
||||
|
||||
// RTC methods performed on target node
|
||||
service RTCService {
|
||||
// offer allows client to initiate a RTC session
|
||||
rpc Offer(SessionDescription) returns (SessionDescription);
|
||||
|
||||
// push channel to allow server to push commands to client
|
||||
rpc Signal(SignalRequest) returns (stream SignalResponse);
|
||||
// rpc Signal(SignalRequest) returns (stream SignalResponse);
|
||||
|
||||
// trickle sends more ICE candidates to server
|
||||
rpc Trickle(TrickleRequest) returns (TrickleResponse);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,358 +0,0 @@
|
||||
// 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