rtc

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Target_name = map[int32]string{
		0: "PUBLISHER",
		1: "SUBSCRIBER",
	}
	Target_value = map[string]int32{
		"PUBLISHER":  0,
		"SUBSCRIBER": 1,
	}
)

Enum value maps for Target.

View Source
var File_protos_rtc_proto protoreflect.FileDescriptor
View Source
var RTC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rtc.RTC",
	HandlerType: (*RTCServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Signal",
			Handler:       _RTC_Signal_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "protos/rtc.proto",
}

RTC_ServiceDesc is the grpc.ServiceDesc for RTC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRTCServer

func RegisterRTCServer(s grpc.ServiceRegistrar, srv RTCServer)

Types

type Description

type Description struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Target      Target `protobuf:"varint,2,opt,name=target,proto3,enum=rtc.Target" json:"target,omitempty"`
	Description []byte `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Description) Descriptor deprecated

func (*Description) Descriptor() ([]byte, []int)

Deprecated: Use Description.ProtoReflect.Descriptor instead.

func (*Description) GetDescription

func (x *Description) GetDescription() []byte

func (*Description) GetId

func (x *Description) GetId() string

func (*Description) GetTarget

func (x *Description) GetTarget() Target

func (*Description) ProtoMessage

func (*Description) ProtoMessage()

func (*Description) ProtoReflect

func (x *Description) ProtoReflect() protoreflect.Message

func (*Description) Reset

func (x *Description) Reset()

func (*Description) String

func (x *Description) String() string

type Error

type Error struct {
	Code   int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetReason

func (x *Error) GetReason() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Join

type Join struct {

	// Types that are assignable to Payload:
	//	*Join_Req
	//	*Join_Reply
	Payload isJoin_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*Join) Descriptor deprecated

func (*Join) Descriptor() ([]byte, []int)

Deprecated: Use Join.ProtoReflect.Descriptor instead.

func (*Join) GetPayload

func (m *Join) GetPayload() isJoin_Payload

func (*Join) GetReply

func (x *Join) GetReply() *JoinReply

func (*Join) GetReq

func (x *Join) GetReq() *JoinRequest

func (*Join) ProtoMessage

func (*Join) ProtoMessage()

func (*Join) ProtoReflect

func (x *Join) ProtoReflect() protoreflect.Message

func (*Join) Reset

func (x *Join) Reset()

func (*Join) String

func (x *Join) String() string

type JoinReply

type JoinReply struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // room is full ?
	// contains filtered or unexported fields
}

func (*JoinReply) Descriptor deprecated

func (*JoinReply) Descriptor() ([]byte, []int)

Deprecated: Use JoinReply.ProtoReflect.Descriptor instead.

func (*JoinReply) GetError

func (x *JoinReply) GetError() string

func (*JoinReply) GetSuccess

func (x *JoinReply) GetSuccess() bool

func (*JoinReply) ProtoMessage

func (*JoinReply) ProtoMessage()

func (*JoinReply) ProtoReflect

func (x *JoinReply) ProtoReflect() protoreflect.Message

func (*JoinReply) Reset

func (x *JoinReply) Reset()

func (*JoinReply) String

func (x *JoinReply) String() string

type JoinRequest

type JoinRequest struct {
	Sid        string            `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
	Uid        string            `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Parameters map[string]string `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*JoinRequest) Descriptor deprecated

func (*JoinRequest) Descriptor() ([]byte, []int)

Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.

func (*JoinRequest) GetParameters

func (x *JoinRequest) GetParameters() map[string]string

func (*JoinRequest) GetSid

func (x *JoinRequest) GetSid() string

func (*JoinRequest) GetUid

func (x *JoinRequest) GetUid() string

func (*JoinRequest) ProtoMessage

func (*JoinRequest) ProtoMessage()

func (*JoinRequest) ProtoReflect

func (x *JoinRequest) ProtoReflect() protoreflect.Message

func (*JoinRequest) Reset

func (x *JoinRequest) Reset()

func (*JoinRequest) String

func (x *JoinRequest) String() string

type Join_Reply

type Join_Reply struct {
	Reply *JoinReply `protobuf:"bytes,2,opt,name=reply,proto3,oneof"`
}

type Join_Req

type Join_Req struct {
	Req *JoinRequest `protobuf:"bytes,1,opt,name=req,proto3,oneof"`
}

type RTCClient

type RTCClient interface {
	Signal(ctx context.Context, opts ...grpc.CallOption) (RTC_SignalClient, error)
}

RTCClient is the client API for RTC 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.

func NewRTCClient

func NewRTCClient(cc grpc.ClientConnInterface) RTCClient

type RTCServer

type RTCServer interface {
	Signal(RTC_SignalServer) error
	// contains filtered or unexported methods
}

RTCServer is the server API for RTC service. All implementations must embed UnimplementedRTCServer for forward compatibility

type RTC_SignalClient

type RTC_SignalClient interface {
	Send(*Signalling) error
	Recv() (*Signalling, error)
	grpc.ClientStream
}

type RTC_SignalServer

type RTC_SignalServer interface {
	Send(*Signalling) error
	Recv() (*Signalling, error)
	grpc.ServerStream
}

type Signalling

type Signalling struct {

	// Types that are assignable to Payload:
	//	*Signalling_Join
	//	*Signalling_Description
	//	*Signalling_Trickle
	//	*Signalling_Error
	Payload isSignalling_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*Signalling) Descriptor deprecated

func (*Signalling) Descriptor() ([]byte, []int)

Deprecated: Use Signalling.ProtoReflect.Descriptor instead.

func (*Signalling) GetDescription

func (x *Signalling) GetDescription() *Description

func (*Signalling) GetError

func (x *Signalling) GetError() *Error

func (*Signalling) GetJoin

func (x *Signalling) GetJoin() *Join

func (*Signalling) GetPayload

func (m *Signalling) GetPayload() isSignalling_Payload

func (*Signalling) GetTrickle

func (x *Signalling) GetTrickle() *Trickle

func (*Signalling) ProtoMessage

func (*Signalling) ProtoMessage()

func (*Signalling) ProtoReflect

func (x *Signalling) ProtoReflect() protoreflect.Message

func (*Signalling) Reset

func (x *Signalling) Reset()

func (*Signalling) String

func (x *Signalling) String() string

type Signalling_Description

type Signalling_Description struct {
	Description *Description `protobuf:"bytes,2,opt,name=description,proto3,oneof"`
}

type Signalling_Error

type Signalling_Error struct {
	Error *Error `protobuf:"bytes,4,opt,name=error,proto3,oneof"`
}

type Signalling_Join

type Signalling_Join struct {
	Join *Join `protobuf:"bytes,1,opt,name=join,proto3,oneof"`
}

type Signalling_Trickle

type Signalling_Trickle struct {
	Trickle *Trickle `protobuf:"bytes,3,opt,name=trickle,proto3,oneof"`
}

type Target

type Target int32
const (
	Target_PUBLISHER  Target = 0
	Target_SUBSCRIBER Target = 1
)

func (Target) Descriptor

func (Target) Descriptor() protoreflect.EnumDescriptor

func (Target) Enum

func (x Target) Enum() *Target

func (Target) EnumDescriptor deprecated

func (Target) EnumDescriptor() ([]byte, []int)

Deprecated: Use Target.Descriptor instead.

func (Target) Number

func (x Target) Number() protoreflect.EnumNumber

func (Target) String

func (x Target) String() string

func (Target) Type

func (Target) Type() protoreflect.EnumType

type Trickle

type Trickle struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Target    Target `protobuf:"varint,2,opt,name=target,proto3,enum=rtc.Target" json:"target,omitempty"`
	Candidate []byte `protobuf:"bytes,3,opt,name=candidate,proto3" json:"candidate,omitempty"`
	// contains filtered or unexported fields
}

func (*Trickle) Descriptor deprecated

func (*Trickle) Descriptor() ([]byte, []int)

Deprecated: Use Trickle.ProtoReflect.Descriptor instead.

func (*Trickle) GetCandidate

func (x *Trickle) GetCandidate() []byte

func (*Trickle) GetId

func (x *Trickle) GetId() string

func (*Trickle) GetTarget

func (x *Trickle) GetTarget() Target

func (*Trickle) ProtoMessage

func (*Trickle) ProtoMessage()

func (*Trickle) ProtoReflect

func (x *Trickle) ProtoReflect() protoreflect.Message

func (*Trickle) Reset

func (x *Trickle) Reset()

func (*Trickle) String

func (x *Trickle) String() string

type UnimplementedRTCServer

type UnimplementedRTCServer struct {
}

UnimplementedRTCServer must be embedded to have forward compatible implementations.

func (UnimplementedRTCServer) Signal

type UnsafeRTCServer

type UnsafeRTCServer interface {
	// contains filtered or unexported methods
}

UnsafeRTCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RTCServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL