Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterStreamServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StreamServiceClient) error
- func RegisterStreamServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterStreamServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StreamServiceServer) error
- func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer)
- type AddStreamRequest
- type AddStreamResponse
- type GetStreamOptionsRequest
- func (*GetStreamOptionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetStreamOptionsRequest) GetName() string
- func (*GetStreamOptionsRequest) ProtoMessage()
- func (x *GetStreamOptionsRequest) ProtoReflect() protoreflect.Message
- func (x *GetStreamOptionsRequest) Reset()
- func (x *GetStreamOptionsRequest) String() string
- type GetStreamOptionsResponse
- func (*GetStreamOptionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetStreamOptionsResponse) GetResolutions() []*Resolution
- func (*GetStreamOptionsResponse) ProtoMessage()
- func (x *GetStreamOptionsResponse) ProtoReflect() protoreflect.Message
- func (x *GetStreamOptionsResponse) Reset()
- func (x *GetStreamOptionsResponse) String() string
- type ListStreamsRequest
- type ListStreamsResponse
- func (*ListStreamsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListStreamsResponse) GetNames() []string
- func (*ListStreamsResponse) ProtoMessage()
- func (x *ListStreamsResponse) ProtoReflect() protoreflect.Message
- func (x *ListStreamsResponse) Reset()
- func (x *ListStreamsResponse) String() string
- type RemoveStreamRequest
- func (*RemoveStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveStreamRequest) GetName() string
- func (*RemoveStreamRequest) ProtoMessage()
- func (x *RemoveStreamRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveStreamRequest) Reset()
- func (x *RemoveStreamRequest) String() string
- type RemoveStreamResponse
- type Resolution
- type SetStreamOptionsRequest
- func (*SetStreamOptionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetStreamOptionsRequest) GetName() string
- func (x *SetStreamOptionsRequest) GetResolution() *Resolution
- func (*SetStreamOptionsRequest) ProtoMessage()
- func (x *SetStreamOptionsRequest) ProtoReflect() protoreflect.Message
- func (x *SetStreamOptionsRequest) Reset()
- func (x *SetStreamOptionsRequest) String() string
- type SetStreamOptionsResponse
- type StreamServiceClient
- type StreamServiceServer
- type UnimplementedStreamServiceServer
- func (UnimplementedStreamServiceServer) AddStream(context.Context, *AddStreamRequest) (*AddStreamResponse, error)
- func (UnimplementedStreamServiceServer) GetStreamOptions(context.Context, *GetStreamOptionsRequest) (*GetStreamOptionsResponse, error)
- func (UnimplementedStreamServiceServer) ListStreams(context.Context, *ListStreamsRequest) (*ListStreamsResponse, error)
- func (UnimplementedStreamServiceServer) RemoveStream(context.Context, *RemoveStreamRequest) (*RemoveStreamResponse, error)
- func (UnimplementedStreamServiceServer) SetStreamOptions(context.Context, *SetStreamOptionsRequest) (*SetStreamOptionsResponse, error)
- type UnsafeStreamServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_stream_v1_stream_proto protoreflect.FileDescriptor
var StreamService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.stream.v1.StreamService", HandlerType: (*StreamServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListStreams", Handler: _StreamService_ListStreams_Handler, }, { MethodName: "AddStream", Handler: _StreamService_AddStream_Handler, }, { MethodName: "GetStreamOptions", Handler: _StreamService_GetStreamOptions_Handler, }, { MethodName: "SetStreamOptions", Handler: _StreamService_SetStreamOptions_Handler, }, { MethodName: "RemoveStream", Handler: _StreamService_RemoveStream_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stream/v1/stream.proto", }
StreamService_ServiceDesc is the grpc.ServiceDesc for StreamService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStreamServiceHandler ¶
func RegisterStreamServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterStreamServiceHandler registers the http handlers for service StreamService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterStreamServiceHandlerClient ¶
func RegisterStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StreamServiceClient) error
RegisterStreamServiceHandlerClient registers the http handlers for service StreamService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StreamServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StreamServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "StreamServiceClient" to call the correct interceptors.
func RegisterStreamServiceHandlerFromEndpoint ¶
func RegisterStreamServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterStreamServiceHandlerFromEndpoint is same as RegisterStreamServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterStreamServiceHandlerServer ¶
func RegisterStreamServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StreamServiceServer) error
RegisterStreamServiceHandlerServer registers the http handlers for service StreamService to "mux". UnaryRPC :call StreamServiceServer 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 RegisterStreamServiceHandlerFromEndpoint instead.
func RegisterStreamServiceServer ¶
func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer)
Types ¶
type AddStreamRequest ¶
type AddStreamRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
A AddStreamRequest requests the given stream be added to the connection.
func (*AddStreamRequest) Descriptor
deprecated
func (*AddStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddStreamRequest.ProtoReflect.Descriptor instead.
func (*AddStreamRequest) GetName ¶
func (x *AddStreamRequest) GetName() string
func (*AddStreamRequest) ProtoMessage ¶
func (*AddStreamRequest) ProtoMessage()
func (*AddStreamRequest) ProtoReflect ¶
func (x *AddStreamRequest) ProtoReflect() protoreflect.Message
func (*AddStreamRequest) Reset ¶
func (x *AddStreamRequest) Reset()
func (*AddStreamRequest) String ¶
func (x *AddStreamRequest) String() string
type AddStreamResponse ¶
type AddStreamResponse struct {
// contains filtered or unexported fields
}
AddStreamResponse is returned after a successful AddStreamRequest.
func (*AddStreamResponse) Descriptor
deprecated
func (*AddStreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddStreamResponse.ProtoReflect.Descriptor instead.
func (*AddStreamResponse) ProtoMessage ¶
func (*AddStreamResponse) ProtoMessage()
func (*AddStreamResponse) ProtoReflect ¶
func (x *AddStreamResponse) ProtoReflect() protoreflect.Message
func (*AddStreamResponse) Reset ¶
func (x *AddStreamResponse) Reset()
func (*AddStreamResponse) String ¶
func (x *AddStreamResponse) String() string
type GetStreamOptionsRequest ¶ added in v0.1.352
type GetStreamOptionsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
GetStreamOptionsRequest requests the options for a particular stream.
func (*GetStreamOptionsRequest) Descriptor
deprecated
added in
v0.1.352
func (*GetStreamOptionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStreamOptionsRequest.ProtoReflect.Descriptor instead.
func (*GetStreamOptionsRequest) GetName ¶ added in v0.1.352
func (x *GetStreamOptionsRequest) GetName() string
func (*GetStreamOptionsRequest) ProtoMessage ¶ added in v0.1.352
func (*GetStreamOptionsRequest) ProtoMessage()
func (*GetStreamOptionsRequest) ProtoReflect ¶ added in v0.1.352
func (x *GetStreamOptionsRequest) ProtoReflect() protoreflect.Message
func (*GetStreamOptionsRequest) Reset ¶ added in v0.1.352
func (x *GetStreamOptionsRequest) Reset()
func (*GetStreamOptionsRequest) String ¶ added in v0.1.352
func (x *GetStreamOptionsRequest) String() string
type GetStreamOptionsResponse ¶ added in v0.1.352
type GetStreamOptionsResponse struct { Resolutions []*Resolution `protobuf:"bytes,1,rep,name=resolutions,proto3" json:"resolutions,omitempty"` // contains filtered or unexported fields }
GetStreamOptionsResponse details the options for a particular stream.
func (*GetStreamOptionsResponse) Descriptor
deprecated
added in
v0.1.352
func (*GetStreamOptionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStreamOptionsResponse.ProtoReflect.Descriptor instead.
func (*GetStreamOptionsResponse) GetResolutions ¶ added in v0.1.352
func (x *GetStreamOptionsResponse) GetResolutions() []*Resolution
func (*GetStreamOptionsResponse) ProtoMessage ¶ added in v0.1.352
func (*GetStreamOptionsResponse) ProtoMessage()
func (*GetStreamOptionsResponse) ProtoReflect ¶ added in v0.1.352
func (x *GetStreamOptionsResponse) ProtoReflect() protoreflect.Message
func (*GetStreamOptionsResponse) Reset ¶ added in v0.1.352
func (x *GetStreamOptionsResponse) Reset()
func (*GetStreamOptionsResponse) String ¶ added in v0.1.352
func (x *GetStreamOptionsResponse) String() string
type ListStreamsRequest ¶
type ListStreamsRequest struct {
// contains filtered or unexported fields
}
ListStreamsRequest requests all streams registered.
func (*ListStreamsRequest) Descriptor
deprecated
func (*ListStreamsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListStreamsRequest.ProtoReflect.Descriptor instead.
func (*ListStreamsRequest) ProtoMessage ¶
func (*ListStreamsRequest) ProtoMessage()
func (*ListStreamsRequest) ProtoReflect ¶
func (x *ListStreamsRequest) ProtoReflect() protoreflect.Message
func (*ListStreamsRequest) Reset ¶
func (x *ListStreamsRequest) Reset()
func (*ListStreamsRequest) String ¶
func (x *ListStreamsRequest) String() string
type ListStreamsResponse ¶
type ListStreamsResponse struct { Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` // contains filtered or unexported fields }
A ListStreamsResponse details streams registered.
func (*ListStreamsResponse) Descriptor
deprecated
func (*ListStreamsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListStreamsResponse.ProtoReflect.Descriptor instead.
func (*ListStreamsResponse) GetNames ¶
func (x *ListStreamsResponse) GetNames() []string
func (*ListStreamsResponse) ProtoMessage ¶
func (*ListStreamsResponse) ProtoMessage()
func (*ListStreamsResponse) ProtoReflect ¶
func (x *ListStreamsResponse) ProtoReflect() protoreflect.Message
func (*ListStreamsResponse) Reset ¶
func (x *ListStreamsResponse) Reset()
func (*ListStreamsResponse) String ¶
func (x *ListStreamsResponse) String() string
type RemoveStreamRequest ¶
type RemoveStreamRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
A RemoveStreamRequest requests the given stream be removed from the connection.
func (*RemoveStreamRequest) Descriptor
deprecated
func (*RemoveStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveStreamRequest.ProtoReflect.Descriptor instead.
func (*RemoveStreamRequest) GetName ¶
func (x *RemoveStreamRequest) GetName() string
func (*RemoveStreamRequest) ProtoMessage ¶
func (*RemoveStreamRequest) ProtoMessage()
func (*RemoveStreamRequest) ProtoReflect ¶
func (x *RemoveStreamRequest) ProtoReflect() protoreflect.Message
func (*RemoveStreamRequest) Reset ¶
func (x *RemoveStreamRequest) Reset()
func (*RemoveStreamRequest) String ¶
func (x *RemoveStreamRequest) String() string
type RemoveStreamResponse ¶
type RemoveStreamResponse struct {
// contains filtered or unexported fields
}
RemoveStreamResponse is returned after a successful RemoveStreamRequest.
func (*RemoveStreamResponse) Descriptor
deprecated
func (*RemoveStreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveStreamResponse.ProtoReflect.Descriptor instead.
func (*RemoveStreamResponse) ProtoMessage ¶
func (*RemoveStreamResponse) ProtoMessage()
func (*RemoveStreamResponse) ProtoReflect ¶
func (x *RemoveStreamResponse) ProtoReflect() protoreflect.Message
func (*RemoveStreamResponse) Reset ¶
func (x *RemoveStreamResponse) Reset()
func (*RemoveStreamResponse) String ¶
func (x *RemoveStreamResponse) String() string
type Resolution ¶ added in v0.1.352
type Resolution struct { Width int32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"` Height int32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // contains filtered or unexported fields }
Resolution details the width and height of a stream.
func (*Resolution) Descriptor
deprecated
added in
v0.1.352
func (*Resolution) Descriptor() ([]byte, []int)
Deprecated: Use Resolution.ProtoReflect.Descriptor instead.
func (*Resolution) GetHeight ¶ added in v0.1.352
func (x *Resolution) GetHeight() int32
func (*Resolution) GetWidth ¶ added in v0.1.352
func (x *Resolution) GetWidth() int32
func (*Resolution) ProtoMessage ¶ added in v0.1.352
func (*Resolution) ProtoMessage()
func (*Resolution) ProtoReflect ¶ added in v0.1.352
func (x *Resolution) ProtoReflect() protoreflect.Message
func (*Resolution) Reset ¶ added in v0.1.352
func (x *Resolution) Reset()
func (*Resolution) String ¶ added in v0.1.352
func (x *Resolution) String() string
type SetStreamOptionsRequest ¶ added in v0.1.352
type SetStreamOptionsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Resolution *Resolution `protobuf:"bytes,2,opt,name=resolution,proto3" json:"resolution,omitempty"` // contains filtered or unexported fields }
SetStreamOptionsRequest sets the options for a particular stream.
func (*SetStreamOptionsRequest) Descriptor
deprecated
added in
v0.1.352
func (*SetStreamOptionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetStreamOptionsRequest.ProtoReflect.Descriptor instead.
func (*SetStreamOptionsRequest) GetName ¶ added in v0.1.352
func (x *SetStreamOptionsRequest) GetName() string
func (*SetStreamOptionsRequest) GetResolution ¶ added in v0.1.352
func (x *SetStreamOptionsRequest) GetResolution() *Resolution
func (*SetStreamOptionsRequest) ProtoMessage ¶ added in v0.1.352
func (*SetStreamOptionsRequest) ProtoMessage()
func (*SetStreamOptionsRequest) ProtoReflect ¶ added in v0.1.352
func (x *SetStreamOptionsRequest) ProtoReflect() protoreflect.Message
func (*SetStreamOptionsRequest) Reset ¶ added in v0.1.352
func (x *SetStreamOptionsRequest) Reset()
func (*SetStreamOptionsRequest) String ¶ added in v0.1.352
func (x *SetStreamOptionsRequest) String() string
type SetStreamOptionsResponse ¶ added in v0.1.352
type SetStreamOptionsResponse struct {
// contains filtered or unexported fields
}
SetStreamOptionsResponse is returned after a successful SetStreamOptionsRequest.
func (*SetStreamOptionsResponse) Descriptor
deprecated
added in
v0.1.352
func (*SetStreamOptionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetStreamOptionsResponse.ProtoReflect.Descriptor instead.
func (*SetStreamOptionsResponse) ProtoMessage ¶ added in v0.1.352
func (*SetStreamOptionsResponse) ProtoMessage()
func (*SetStreamOptionsResponse) ProtoReflect ¶ added in v0.1.352
func (x *SetStreamOptionsResponse) ProtoReflect() protoreflect.Message
func (*SetStreamOptionsResponse) Reset ¶ added in v0.1.352
func (x *SetStreamOptionsResponse) Reset()
func (*SetStreamOptionsResponse) String ¶ added in v0.1.352
func (x *SetStreamOptionsResponse) String() string
type StreamServiceClient ¶
type StreamServiceClient interface { // ListStreams returns all streams registered. ListStreams(ctx context.Context, in *ListStreamsRequest, opts ...grpc.CallOption) (*ListStreamsResponse, error) // AddStream requests a particular stream be added. AddStream(ctx context.Context, in *AddStreamRequest, opts ...grpc.CallOption) (*AddStreamResponse, error) // GetStreamOptions returns the options for a particular stream. GetStreamOptions(ctx context.Context, in *GetStreamOptionsRequest, opts ...grpc.CallOption) (*GetStreamOptionsResponse, error) // SetStreamOptions sets the options for a particular stream. SetStreamOptions(ctx context.Context, in *SetStreamOptionsRequest, opts ...grpc.CallOption) (*SetStreamOptionsResponse, error) // RemoveStream requests a particular stream be removed. If the calling client // is the last to be receiving the stream, it will attempt to be stopped to // conserve resources. RemoveStream(ctx context.Context, in *RemoveStreamRequest, opts ...grpc.CallOption) (*RemoveStreamResponse, error) }
StreamServiceClient is the client API for StreamService 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 NewStreamServiceClient ¶
func NewStreamServiceClient(cc grpc.ClientConnInterface) StreamServiceClient
type StreamServiceServer ¶
type StreamServiceServer interface { // ListStreams returns all streams registered. ListStreams(context.Context, *ListStreamsRequest) (*ListStreamsResponse, error) // AddStream requests a particular stream be added. AddStream(context.Context, *AddStreamRequest) (*AddStreamResponse, error) // GetStreamOptions returns the options for a particular stream. GetStreamOptions(context.Context, *GetStreamOptionsRequest) (*GetStreamOptionsResponse, error) // SetStreamOptions sets the options for a particular stream. SetStreamOptions(context.Context, *SetStreamOptionsRequest) (*SetStreamOptionsResponse, error) // RemoveStream requests a particular stream be removed. If the calling client // is the last to be receiving the stream, it will attempt to be stopped to // conserve resources. RemoveStream(context.Context, *RemoveStreamRequest) (*RemoveStreamResponse, error) // contains filtered or unexported methods }
StreamServiceServer is the server API for StreamService service. All implementations must embed UnimplementedStreamServiceServer for forward compatibility
type UnimplementedStreamServiceServer ¶
type UnimplementedStreamServiceServer struct { }
UnimplementedStreamServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedStreamServiceServer) AddStream ¶
func (UnimplementedStreamServiceServer) AddStream(context.Context, *AddStreamRequest) (*AddStreamResponse, error)
func (UnimplementedStreamServiceServer) GetStreamOptions ¶ added in v0.1.352
func (UnimplementedStreamServiceServer) GetStreamOptions(context.Context, *GetStreamOptionsRequest) (*GetStreamOptionsResponse, error)
func (UnimplementedStreamServiceServer) ListStreams ¶
func (UnimplementedStreamServiceServer) ListStreams(context.Context, *ListStreamsRequest) (*ListStreamsResponse, error)
func (UnimplementedStreamServiceServer) RemoveStream ¶
func (UnimplementedStreamServiceServer) RemoveStream(context.Context, *RemoveStreamRequest) (*RemoveStreamResponse, error)
func (UnimplementedStreamServiceServer) SetStreamOptions ¶ added in v0.1.352
func (UnimplementedStreamServiceServer) SetStreamOptions(context.Context, *SetStreamOptionsRequest) (*SetStreamOptionsResponse, error)
type UnsafeStreamServiceServer ¶
type UnsafeStreamServiceServer interface {
// contains filtered or unexported methods
}
UnsafeStreamServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StreamServiceServer will result in compilation errors.