Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSignalingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSignalingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignalingServiceClient) error
- func RegisterSignalingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSignalingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignalingServiceServer) error
- func RegisterSignalingServiceServer(s grpc.ServiceRegistrar, srv SignalingServiceServer)
- type AnswerRequest
- type AnswerResponse
- func (*AnswerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AnswerResponse) GetSdp() string
- func (x *AnswerResponse) GetStatus() *status.Status
- func (*AnswerResponse) ProtoMessage()
- func (x *AnswerResponse) ProtoReflect() protoreflect.Message
- func (x *AnswerResponse) Reset()
- func (x *AnswerResponse) String() string
- type CallRequest
- type CallResponse
- type Metadata
- type PacketMessage
- func (*PacketMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PacketMessage) GetData() []byte
- func (x *PacketMessage) GetEom() bool
- func (*PacketMessage) ProtoMessage()
- func (x *PacketMessage) ProtoReflect() protoreflect.Message
- func (x *PacketMessage) Reset()
- func (x *PacketMessage) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetHeaders() *RequestHeaders
- func (x *Request) GetMessage() *RequestMessage
- func (x *Request) GetStream() *Stream
- func (m *Request) GetType() isRequest_Type
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type RequestHeaders
- func (*RequestHeaders) Descriptor() ([]byte, []int)deprecated
- func (x *RequestHeaders) GetMetadata() *Metadata
- func (x *RequestHeaders) GetMethod() string
- func (x *RequestHeaders) GetTimeout() *durationpb.Duration
- func (*RequestHeaders) ProtoMessage()
- func (x *RequestHeaders) ProtoReflect() protoreflect.Message
- func (x *RequestHeaders) Reset()
- func (x *RequestHeaders) String() string
- type RequestMessage
- func (*RequestMessage) Descriptor() ([]byte, []int)deprecated
- func (x *RequestMessage) GetEos() bool
- func (x *RequestMessage) GetHasMessage() bool
- func (x *RequestMessage) GetPacketMessage() *PacketMessage
- func (*RequestMessage) ProtoMessage()
- func (x *RequestMessage) ProtoReflect() protoreflect.Message
- func (x *RequestMessage) Reset()
- func (x *RequestMessage) String() string
- type Request_Headers
- type Request_Message
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetHeaders() *ResponseHeaders
- func (x *Response) GetMessage() *ResponseMessage
- func (x *Response) GetStream() *Stream
- func (x *Response) GetTrailers() *ResponseTrailers
- func (m *Response) GetType() isResponse_Type
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type ResponseHeaders
- type ResponseMessage
- type ResponseTrailers
- func (*ResponseTrailers) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseTrailers) GetMetadata() *Metadata
- func (x *ResponseTrailers) GetStatus() *status.Status
- func (*ResponseTrailers) ProtoMessage()
- func (x *ResponseTrailers) ProtoReflect() protoreflect.Message
- func (x *ResponseTrailers) Reset()
- func (x *ResponseTrailers) String() string
- type Response_Headers
- type Response_Message
- type Response_Trailers
- type SignalingServiceClient
- type SignalingServiceServer
- type SignalingService_AnswerClient
- type SignalingService_AnswerServer
- type Stream
- type Strings
- type UnimplementedSignalingServiceServer
- type UnsafeSignalingServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_rpc_webrtc_v1_grpc_proto protoreflect.FileDescriptor
var File_proto_rpc_webrtc_v1_signaling_proto protoreflect.FileDescriptor
var SignalingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.rpc.webrtc.v1.SignalingService", HandlerType: (*SignalingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Call", Handler: _SignalingService_Call_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Answer", Handler: _SignalingService_Answer_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/rpc/webrtc/v1/signaling.proto", }
SignalingService_ServiceDesc is the grpc.ServiceDesc for SignalingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSignalingServiceHandler ¶
func RegisterSignalingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSignalingServiceHandler registers the http handlers for service SignalingService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSignalingServiceHandlerClient ¶
func RegisterSignalingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignalingServiceClient) error
RegisterSignalingServiceHandlerClient registers the http handlers for service SignalingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SignalingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SignalingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SignalingServiceClient" to call the correct interceptors.
func RegisterSignalingServiceHandlerFromEndpoint ¶
func RegisterSignalingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSignalingServiceHandlerFromEndpoint is same as RegisterSignalingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSignalingServiceHandlerServer ¶
func RegisterSignalingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignalingServiceServer) error
RegisterSignalingServiceHandlerServer registers the http handlers for service SignalingService to "mux". UnaryRPC :call SignalingServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSignalingServiceHandlerFromEndpoint instead.
func RegisterSignalingServiceServer ¶
func RegisterSignalingServiceServer(s grpc.ServiceRegistrar, srv SignalingServiceServer)
Types ¶
type AnswerRequest ¶
type AnswerRequest struct { Sdp string `protobuf:"bytes,1,opt,name=sdp,proto3" json:"sdp,omitempty"` // contains filtered or unexported fields }
AnswerRequest is the SDP offer that the controlling side is making via the answering stream.
func (*AnswerRequest) Descriptor
deprecated
func (*AnswerRequest) Descriptor() ([]byte, []int)
Deprecated: Use AnswerRequest.ProtoReflect.Descriptor instead.
func (*AnswerRequest) GetSdp ¶
func (x *AnswerRequest) GetSdp() string
func (*AnswerRequest) ProtoMessage ¶
func (*AnswerRequest) ProtoMessage()
func (*AnswerRequest) ProtoReflect ¶
func (x *AnswerRequest) ProtoReflect() protoreflect.Message
func (*AnswerRequest) Reset ¶
func (x *AnswerRequest) Reset()
func (*AnswerRequest) String ¶
func (x *AnswerRequest) String() string
type AnswerResponse ¶
type AnswerResponse struct { Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Sdp string `protobuf:"bytes,2,opt,name=sdp,proto3" json:"sdp,omitempty"` // contains filtered or unexported fields }
AnswerResponse is the SDP answer that an answerer responds with.
func (*AnswerResponse) Descriptor
deprecated
func (*AnswerResponse) Descriptor() ([]byte, []int)
Deprecated: Use AnswerResponse.ProtoReflect.Descriptor instead.
func (*AnswerResponse) GetSdp ¶
func (x *AnswerResponse) GetSdp() string
func (*AnswerResponse) GetStatus ¶
func (x *AnswerResponse) GetStatus() *status.Status
func (*AnswerResponse) ProtoMessage ¶
func (*AnswerResponse) ProtoMessage()
func (*AnswerResponse) ProtoReflect ¶
func (x *AnswerResponse) ProtoReflect() protoreflect.Message
func (*AnswerResponse) Reset ¶
func (x *AnswerResponse) Reset()
func (*AnswerResponse) String ¶
func (x *AnswerResponse) String() string
type CallRequest ¶
type CallRequest struct { Sdp string `protobuf:"bytes,1,opt,name=sdp,proto3" json:"sdp,omitempty"` // contains filtered or unexported fields }
CallRequest is the SDP offer that the controlling side is making.
func (*CallRequest) Descriptor
deprecated
func (*CallRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.
func (*CallRequest) GetSdp ¶
func (x *CallRequest) GetSdp() string
func (*CallRequest) ProtoMessage ¶
func (*CallRequest) ProtoMessage()
func (*CallRequest) ProtoReflect ¶
func (x *CallRequest) ProtoReflect() protoreflect.Message
func (*CallRequest) Reset ¶
func (x *CallRequest) Reset()
func (*CallRequest) String ¶
func (x *CallRequest) String() string
type CallResponse ¶
type CallResponse struct { Sdp string `protobuf:"bytes,1,opt,name=sdp,proto3" json:"sdp,omitempty"` // contains filtered or unexported fields }
CallResponse is the SDP answer that the controlled side responds with.
func (*CallResponse) Descriptor
deprecated
func (*CallResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallResponse.ProtoReflect.Descriptor instead.
func (*CallResponse) GetSdp ¶
func (x *CallResponse) GetSdp() string
func (*CallResponse) ProtoMessage ¶
func (*CallResponse) ProtoMessage()
func (*CallResponse) ProtoReflect ¶
func (x *CallResponse) ProtoReflect() protoreflect.Message
func (*CallResponse) Reset ¶
func (x *CallResponse) Reset()
func (*CallResponse) String ¶
func (x *CallResponse) String() string
type Metadata ¶
type Metadata struct { Md map[string]*Strings `` /* 145-byte string literal not displayed */ // contains filtered or unexported fields }
Metadata is for custom key values provided by a client or server during a stream.
func (*Metadata) Descriptor
deprecated
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type PacketMessage ¶
type PacketMessage struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Eom bool `protobuf:"varint,2,opt,name=eom,proto3" json:"eom,omitempty"` // contains filtered or unexported fields }
A PacketMessage is used to packetize large messages (> 64KiB) to be able to safely transmit over WebRTC data channels.
func (*PacketMessage) Descriptor
deprecated
func (*PacketMessage) Descriptor() ([]byte, []int)
Deprecated: Use PacketMessage.ProtoReflect.Descriptor instead.
func (*PacketMessage) GetData ¶
func (x *PacketMessage) GetData() []byte
func (*PacketMessage) GetEom ¶
func (x *PacketMessage) GetEom() bool
func (*PacketMessage) ProtoMessage ¶
func (*PacketMessage) ProtoMessage()
func (*PacketMessage) ProtoReflect ¶
func (x *PacketMessage) ProtoReflect() protoreflect.Message
func (*PacketMessage) Reset ¶
func (x *PacketMessage) Reset()
func (*PacketMessage) String ¶
func (x *PacketMessage) String() string
type Request ¶
type Request struct { Stream *Stream `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` // Types that are assignable to Type: // *Request_Headers // *Request_Message Type isRequest_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
A Request is a frame coming from a client. It is always associated with a stream where the client assigns the stream identifier. Servers will drop frames where the stream identifier has no association (if a non-header frames are sent).
func (*Request) Descriptor
deprecated
func (*Request) GetHeaders ¶
func (x *Request) GetHeaders() *RequestHeaders
func (*Request) GetMessage ¶
func (x *Request) GetMessage() *RequestMessage
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type RequestHeaders ¶
type RequestHeaders struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
RequestHeaders describe the unary or streaming call to make.
func (*RequestHeaders) Descriptor
deprecated
func (*RequestHeaders) Descriptor() ([]byte, []int)
Deprecated: Use RequestHeaders.ProtoReflect.Descriptor instead.
func (*RequestHeaders) GetMetadata ¶
func (x *RequestHeaders) GetMetadata() *Metadata
func (*RequestHeaders) GetMethod ¶
func (x *RequestHeaders) GetMethod() string
func (*RequestHeaders) GetTimeout ¶
func (x *RequestHeaders) GetTimeout() *durationpb.Duration
func (*RequestHeaders) ProtoMessage ¶
func (*RequestHeaders) ProtoMessage()
func (*RequestHeaders) ProtoReflect ¶
func (x *RequestHeaders) ProtoReflect() protoreflect.Message
func (*RequestHeaders) Reset ¶
func (x *RequestHeaders) Reset()
func (*RequestHeaders) String ¶
func (x *RequestHeaders) String() string
type RequestMessage ¶
type RequestMessage struct { HasMessage bool `protobuf:"varint,1,opt,name=has_message,json=hasMessage,proto3" json:"has_message,omitempty"` PacketMessage *PacketMessage `protobuf:"bytes,2,opt,name=packet_message,json=packetMessage,proto3" json:"packet_message,omitempty"` Eos bool `protobuf:"varint,3,opt,name=eos,proto3" json:"eos,omitempty"` // contains filtered or unexported fields }
A RequestMessage contains individual gRPC messages and a potential end-of-stream (EOS) marker.
func (*RequestMessage) Descriptor
deprecated
func (*RequestMessage) Descriptor() ([]byte, []int)
Deprecated: Use RequestMessage.ProtoReflect.Descriptor instead.
func (*RequestMessage) GetEos ¶
func (x *RequestMessage) GetEos() bool
func (*RequestMessage) GetHasMessage ¶
func (x *RequestMessage) GetHasMessage() bool
func (*RequestMessage) GetPacketMessage ¶
func (x *RequestMessage) GetPacketMessage() *PacketMessage
func (*RequestMessage) ProtoMessage ¶
func (*RequestMessage) ProtoMessage()
func (*RequestMessage) ProtoReflect ¶
func (x *RequestMessage) ProtoReflect() protoreflect.Message
func (*RequestMessage) Reset ¶
func (x *RequestMessage) Reset()
func (*RequestMessage) String ¶
func (x *RequestMessage) String() string
type Request_Headers ¶
type Request_Headers struct {
Headers *RequestHeaders `protobuf:"bytes,2,opt,name=headers,proto3,oneof"`
}
type Request_Message ¶
type Request_Message struct {
Message *RequestMessage `protobuf:"bytes,3,opt,name=message,proto3,oneof"`
}
type Response ¶
type Response struct { Stream *Stream `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` // Types that are assignable to Type: // *Response_Headers // *Response_Message // *Response_Trailers Type isResponse_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
A Response is a frame coming from a server. It is always associated with a stream where the client assigns the stream identifier. Clients will drop frames where the stream identifier has no association.
func (*Response) Descriptor
deprecated
func (*Response) GetHeaders ¶
func (x *Response) GetHeaders() *ResponseHeaders
func (*Response) GetMessage ¶
func (x *Response) GetMessage() *ResponseMessage
func (*Response) GetTrailers ¶
func (x *Response) GetTrailers() *ResponseTrailers
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type ResponseHeaders ¶
type ResponseHeaders struct { Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
ResponseHeaders contain custom metadata that are sent to the client before any message or trailers (unless only trailers are sent).
func (*ResponseHeaders) Descriptor
deprecated
func (*ResponseHeaders) Descriptor() ([]byte, []int)
Deprecated: Use ResponseHeaders.ProtoReflect.Descriptor instead.
func (*ResponseHeaders) GetMetadata ¶
func (x *ResponseHeaders) GetMetadata() *Metadata
func (*ResponseHeaders) ProtoMessage ¶
func (*ResponseHeaders) ProtoMessage()
func (*ResponseHeaders) ProtoReflect ¶
func (x *ResponseHeaders) ProtoReflect() protoreflect.Message
func (*ResponseHeaders) Reset ¶
func (x *ResponseHeaders) Reset()
func (*ResponseHeaders) String ¶
func (x *ResponseHeaders) String() string
type ResponseMessage ¶
type ResponseMessage struct { PacketMessage *PacketMessage `protobuf:"bytes,1,opt,name=packet_message,json=packetMessage,proto3" json:"packet_message,omitempty"` // contains filtered or unexported fields }
ResponseMessage contains the data of a response to a call.
func (*ResponseMessage) Descriptor
deprecated
func (*ResponseMessage) Descriptor() ([]byte, []int)
Deprecated: Use ResponseMessage.ProtoReflect.Descriptor instead.
func (*ResponseMessage) GetPacketMessage ¶
func (x *ResponseMessage) GetPacketMessage() *PacketMessage
func (*ResponseMessage) ProtoMessage ¶
func (*ResponseMessage) ProtoMessage()
func (*ResponseMessage) ProtoReflect ¶
func (x *ResponseMessage) ProtoReflect() protoreflect.Message
func (*ResponseMessage) Reset ¶
func (x *ResponseMessage) Reset()
func (*ResponseMessage) String ¶
func (x *ResponseMessage) String() string
type ResponseTrailers ¶
type ResponseTrailers struct { Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
ResponseTrailers contain the status of a response and any custom metadata.
func (*ResponseTrailers) Descriptor
deprecated
func (*ResponseTrailers) Descriptor() ([]byte, []int)
Deprecated: Use ResponseTrailers.ProtoReflect.Descriptor instead.
func (*ResponseTrailers) GetMetadata ¶
func (x *ResponseTrailers) GetMetadata() *Metadata
func (*ResponseTrailers) GetStatus ¶
func (x *ResponseTrailers) GetStatus() *status.Status
func (*ResponseTrailers) ProtoMessage ¶
func (*ResponseTrailers) ProtoMessage()
func (*ResponseTrailers) ProtoReflect ¶
func (x *ResponseTrailers) ProtoReflect() protoreflect.Message
func (*ResponseTrailers) Reset ¶
func (x *ResponseTrailers) Reset()
func (*ResponseTrailers) String ¶
func (x *ResponseTrailers) String() string
type Response_Headers ¶
type Response_Headers struct {
Headers *ResponseHeaders `protobuf:"bytes,2,opt,name=headers,proto3,oneof"`
}
type Response_Message ¶
type Response_Message struct {
Message *ResponseMessage `protobuf:"bytes,3,opt,name=message,proto3,oneof"`
}
type Response_Trailers ¶
type Response_Trailers struct {
Trailers *ResponseTrailers `protobuf:"bytes,4,opt,name=trailers,proto3,oneof"`
}
type SignalingServiceClient ¶
type SignalingServiceClient interface { // Call makes an offer to a client that it expects an answer to. It is // assumed that the service is hosted solely for a specific client. That is, // every client has its own signaling service identified by its hostname // and in the case of TLS being used, SNI. Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) // Answer sets up an answering service where the caller answers call offers // and responds with answers. Answer(ctx context.Context, opts ...grpc.CallOption) (SignalingService_AnswerClient, error) }
SignalingServiceClient is the client API for SignalingService 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 NewSignalingServiceClient ¶
func NewSignalingServiceClient(cc grpc.ClientConnInterface) SignalingServiceClient
type SignalingServiceServer ¶
type SignalingServiceServer interface { // Call makes an offer to a client that it expects an answer to. It is // assumed that the service is hosted solely for a specific client. That is, // every client has its own signaling service identified by its hostname // and in the case of TLS being used, SNI. Call(context.Context, *CallRequest) (*CallResponse, error) // Answer sets up an answering service where the caller answers call offers // and responds with answers. Answer(SignalingService_AnswerServer) error // contains filtered or unexported methods }
SignalingServiceServer is the server API for SignalingService service. All implementations must embed UnimplementedSignalingServiceServer for forward compatibility
type SignalingService_AnswerClient ¶
type SignalingService_AnswerClient interface { Send(*AnswerResponse) error Recv() (*AnswerRequest, error) grpc.ClientStream }
type SignalingService_AnswerServer ¶
type SignalingService_AnswerServer interface { Send(*AnswerRequest) error Recv() (*AnswerResponse, error) grpc.ServerStream }
type Stream ¶
type Stream struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
A Stream represents an instance of a gRPC stream between a client and a server.
func (*Stream) Descriptor
deprecated
func (*Stream) ProtoMessage ¶
func (*Stream) ProtoMessage()
func (*Stream) ProtoReflect ¶
func (x *Stream) ProtoReflect() protoreflect.Message
type Strings ¶
type Strings struct { Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Strings are a series of values.
func (*Strings) Descriptor
deprecated
func (*Strings) ProtoMessage ¶
func (*Strings) ProtoMessage()
func (*Strings) ProtoReflect ¶
func (x *Strings) ProtoReflect() protoreflect.Message
type UnimplementedSignalingServiceServer ¶
type UnimplementedSignalingServiceServer struct { }
UnimplementedSignalingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSignalingServiceServer) Call ¶
func (UnimplementedSignalingServiceServer) Call(context.Context, *CallRequest) (*CallResponse, error)
type UnsafeSignalingServiceServer ¶
type UnsafeSignalingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSignalingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignalingServiceServer will result in compilation errors.