github.com/cloudwan/edgelq-sdk@v1.15.4/logging/client/v1/log/log_service.pb.client.go (about)

     1  // Code generated by protoc-gen-goten-client
     2  // API: LogService
     3  // DO NOT EDIT!!!
     4  
     5  package log_client
     6  
     7  import (
     8  	"context"
     9  
    10  	"google.golang.org/grpc"
    11  	"google.golang.org/protobuf/runtime/protoimpl"
    12  )
    13  
    14  // proto imports
    15  import (
    16  	log "github.com/cloudwan/edgelq-sdk/logging/resources/v1/log"
    17  )
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var (
    21  	_ = protoimpl.DescBuilder{}
    22  	_ = new(context.Context)
    23  	_ = grpc.ClientConn{}
    24  )
    25  
    26  // make sure we're using proto imports
    27  var (
    28  	_ = &log.Log{}
    29  )
    30  
    31  // This is a compile-time assertion to ensure that this generated file
    32  // is compatible with the proto package it is being compiled against.
    33  // A compilation error at this line likely means your copy of the
    34  // proto package needs to be updated.
    35  const (
    36  	// Verify that this generated code is sufficiently up-to-date.
    37  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    38  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    39  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    40  )
    41  
    42  // This is a compile-time assertion to ensure that this generated file
    43  // is compatible with the grpc package it is being compiled against.
    44  const _ = grpc.SupportPackageIsVersion6
    45  
    46  // LogServiceClient is the client API for LogService.
    47  //
    48  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
    49  type LogServiceClient interface {
    50  	ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error)
    51  	CreateLogs(ctx context.Context, in *CreateLogsRequest, opts ...grpc.CallOption) (*CreateLogsResponse, error)
    52  	StreamingCreateLogs(ctx context.Context, opts ...grpc.CallOption) (StreamingCreateLogsClientStream, error)
    53  }
    54  
    55  type client struct {
    56  	cc grpc.ClientConnInterface
    57  }
    58  
    59  func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient {
    60  	return &client{cc}
    61  }
    62  
    63  func (c *client) ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) {
    64  	out := new(ListLogsResponse)
    65  	err := c.cc.Invoke(ctx, "/ntt.logging.v1.LogService/ListLogs", in, out, opts...)
    66  	if err != nil {
    67  		return nil, err
    68  	}
    69  	return out, nil
    70  }
    71  
    72  func (c *client) CreateLogs(ctx context.Context, in *CreateLogsRequest, opts ...grpc.CallOption) (*CreateLogsResponse, error) {
    73  	out := new(CreateLogsResponse)
    74  	err := c.cc.Invoke(ctx, "/ntt.logging.v1.LogService/CreateLogs", in, out, opts...)
    75  	if err != nil {
    76  		return nil, err
    77  	}
    78  	return out, nil
    79  }
    80  
    81  func (c *client) StreamingCreateLogs(ctx context.Context, opts ...grpc.CallOption) (StreamingCreateLogsClientStream, error) {
    82  	stream, err := c.cc.NewStream(ctx,
    83  		&grpc.StreamDesc{
    84  			StreamName:    "StreamingCreateLogs",
    85  			ServerStreams: true,
    86  			ClientStreams: true,
    87  		},
    88  		"/ntt.logging.v1.LogService/StreamingCreateLogs", opts...)
    89  	if err != nil {
    90  		return nil, err
    91  	}
    92  	x := &streamingCreateLogsStreamingCreateLogsClient{stream}
    93  	return x, nil
    94  }
    95  
    96  type StreamingCreateLogsClientStream interface {
    97  	Send(*StreamingCreateLogsRequest) error
    98  	Recv() (*StreamingCreateLogsResponse, error)
    99  	grpc.ClientStream
   100  }
   101  
   102  type streamingCreateLogsStreamingCreateLogsClient struct {
   103  	grpc.ClientStream
   104  }
   105  
   106  func (x *streamingCreateLogsStreamingCreateLogsClient) Send(m *StreamingCreateLogsRequest) error {
   107  	return x.ClientStream.SendMsg(m)
   108  }
   109  
   110  func (x *streamingCreateLogsStreamingCreateLogsClient) Recv() (*StreamingCreateLogsResponse, error) {
   111  	m := new(StreamingCreateLogsResponse)
   112  	if err := x.ClientStream.RecvMsg(m); err != nil {
   113  		return nil, err
   114  	}
   115  	return m, nil
   116  }