Files
monibuca/plugin/stress/pb/stress_grpc.pb.go
langhuihui 13e1029b1d feat: h265
2024-07-17 08:47:20 +08:00

360 lines
12 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.1
// source: stress.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
pb "m7s.live/m7s/v5/pb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ApiClient is the client API for Api 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 ApiClient interface {
PushRTMP(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error)
PushRTSP(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error)
PullRTMP(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error)
PullRTSP(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error)
PullHDL(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error)
GetCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CountResponse, error)
StopPush(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*pb.SuccessResponse, error)
StopPull(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*pb.SuccessResponse, error)
}
type apiClient struct {
cc grpc.ClientConnInterface
}
func NewApiClient(cc grpc.ClientConnInterface) ApiClient {
return &apiClient{cc}
}
func (c *apiClient) PushRTMP(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error) {
out := new(pb.SuccessResponse)
err := c.cc.Invoke(ctx, "/stress.api/PushRTMP", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *apiClient) PushRTSP(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error) {
out := new(pb.SuccessResponse)
err := c.cc.Invoke(ctx, "/stress.api/PushRTSP", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *apiClient) PullRTMP(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error) {
out := new(pb.SuccessResponse)
err := c.cc.Invoke(ctx, "/stress.api/PullRTMP", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *apiClient) PullRTSP(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error) {
out := new(pb.SuccessResponse)
err := c.cc.Invoke(ctx, "/stress.api/PullRTSP", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *apiClient) PullHDL(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*pb.SuccessResponse, error) {
out := new(pb.SuccessResponse)
err := c.cc.Invoke(ctx, "/stress.api/PullHDL", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *apiClient) GetCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CountResponse, error) {
out := new(CountResponse)
err := c.cc.Invoke(ctx, "/stress.api/GetCount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *apiClient) StopPush(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*pb.SuccessResponse, error) {
out := new(pb.SuccessResponse)
err := c.cc.Invoke(ctx, "/stress.api/StopPush", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *apiClient) StopPull(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*pb.SuccessResponse, error) {
out := new(pb.SuccessResponse)
err := c.cc.Invoke(ctx, "/stress.api/StopPull", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ApiServer is the server API for Api service.
// All implementations must embed UnimplementedApiServer
// for forward compatibility
type ApiServer interface {
PushRTMP(context.Context, *PushRequest) (*pb.SuccessResponse, error)
PushRTSP(context.Context, *PushRequest) (*pb.SuccessResponse, error)
PullRTMP(context.Context, *PullRequest) (*pb.SuccessResponse, error)
PullRTSP(context.Context, *PullRequest) (*pb.SuccessResponse, error)
PullHDL(context.Context, *PullRequest) (*pb.SuccessResponse, error)
GetCount(context.Context, *emptypb.Empty) (*CountResponse, error)
StopPush(context.Context, *emptypb.Empty) (*pb.SuccessResponse, error)
StopPull(context.Context, *emptypb.Empty) (*pb.SuccessResponse, error)
mustEmbedUnimplementedApiServer()
}
// UnimplementedApiServer must be embedded to have forward compatible implementations.
type UnimplementedApiServer struct {
}
func (UnimplementedApiServer) PushRTMP(context.Context, *PushRequest) (*pb.SuccessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushRTMP not implemented")
}
func (UnimplementedApiServer) PushRTSP(context.Context, *PushRequest) (*pb.SuccessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushRTSP not implemented")
}
func (UnimplementedApiServer) PullRTMP(context.Context, *PullRequest) (*pb.SuccessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PullRTMP not implemented")
}
func (UnimplementedApiServer) PullRTSP(context.Context, *PullRequest) (*pb.SuccessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PullRTSP not implemented")
}
func (UnimplementedApiServer) PullHDL(context.Context, *PullRequest) (*pb.SuccessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PullHDL not implemented")
}
func (UnimplementedApiServer) GetCount(context.Context, *emptypb.Empty) (*CountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCount not implemented")
}
func (UnimplementedApiServer) StopPush(context.Context, *emptypb.Empty) (*pb.SuccessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method StopPush not implemented")
}
func (UnimplementedApiServer) StopPull(context.Context, *emptypb.Empty) (*pb.SuccessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method StopPull not implemented")
}
func (UnimplementedApiServer) mustEmbedUnimplementedApiServer() {}
// UnsafeApiServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ApiServer will
// result in compilation errors.
type UnsafeApiServer interface {
mustEmbedUnimplementedApiServer()
}
func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer) {
s.RegisterService(&Api_ServiceDesc, srv)
}
func _Api_PushRTMP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).PushRTMP(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/PushRTMP",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).PushRTMP(ctx, req.(*PushRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Api_PushRTSP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).PushRTSP(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/PushRTSP",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).PushRTSP(ctx, req.(*PushRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Api_PullRTMP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PullRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).PullRTMP(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/PullRTMP",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).PullRTMP(ctx, req.(*PullRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Api_PullRTSP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PullRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).PullRTSP(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/PullRTSP",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).PullRTSP(ctx, req.(*PullRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Api_PullHDL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PullRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).PullHDL(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/PullHDL",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).PullHDL(ctx, req.(*PullRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Api_GetCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).GetCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/GetCount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).GetCount(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Api_StopPush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).StopPush(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/StopPush",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).StopPush(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Api_StopPull_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServer).StopPull(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stress.api/StopPull",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServer).StopPull(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
// Api_ServiceDesc is the grpc.ServiceDesc for Api service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Api_ServiceDesc = grpc.ServiceDesc{
ServiceName: "stress.api",
HandlerType: (*ApiServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PushRTMP",
Handler: _Api_PushRTMP_Handler,
},
{
MethodName: "PushRTSP",
Handler: _Api_PushRTSP_Handler,
},
{
MethodName: "PullRTMP",
Handler: _Api_PullRTMP_Handler,
},
{
MethodName: "PullRTSP",
Handler: _Api_PullRTSP_Handler,
},
{
MethodName: "PullHDL",
Handler: _Api_PullHDL_Handler,
},
{
MethodName: "GetCount",
Handler: _Api_GetCount_Handler,
},
{
MethodName: "StopPush",
Handler: _Api_StopPush_Handler,
},
{
MethodName: "StopPull",
Handler: _Api_StopPull_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "stress.proto",
}