123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc v3.19.4
- // source: protos/client.proto
- package client
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // 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
- // PaintClientClient is the client API for PaintClient 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 PaintClientClient interface {
- // Sends a greeting
- Paint(ctx context.Context, in *PaintRequest, opts ...grpc.CallOption) (*PaintReply, error)
- Monitor(ctx context.Context, in *MonitorSub, opts ...grpc.CallOption) (PaintClient_MonitorClient, error)
- RequestRTC(ctx context.Context, opts ...grpc.CallOption) (PaintClient_RequestRTCClient, error)
- }
- type paintClientClient struct {
- cc grpc.ClientConnInterface
- }
- func NewPaintClientClient(cc grpc.ClientConnInterface) PaintClientClient {
- return &paintClientClient{cc}
- }
- func (c *paintClientClient) Paint(ctx context.Context, in *PaintRequest, opts ...grpc.CallOption) (*PaintReply, error) {
- out := new(PaintReply)
- err := c.cc.Invoke(ctx, "/PaintClient/Paint", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *paintClientClient) Monitor(ctx context.Context, in *MonitorSub, opts ...grpc.CallOption) (PaintClient_MonitorClient, error) {
- stream, err := c.cc.NewStream(ctx, &PaintClient_ServiceDesc.Streams[0], "/PaintClient/Monitor", opts...)
- if err != nil {
- return nil, err
- }
- x := &paintClientMonitorClient{stream}
- if err := x.ClientStream.SendMsg(in); err != nil {
- return nil, err
- }
- if err := x.ClientStream.CloseSend(); err != nil {
- return nil, err
- }
- return x, nil
- }
- type PaintClient_MonitorClient interface {
- Recv() (*MonitorReply, error)
- grpc.ClientStream
- }
- type paintClientMonitorClient struct {
- grpc.ClientStream
- }
- func (x *paintClientMonitorClient) Recv() (*MonitorReply, error) {
- m := new(MonitorReply)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *paintClientClient) RequestRTC(ctx context.Context, opts ...grpc.CallOption) (PaintClient_RequestRTCClient, error) {
- stream, err := c.cc.NewStream(ctx, &PaintClient_ServiceDesc.Streams[1], "/PaintClient/RequestRTC", opts...)
- if err != nil {
- return nil, err
- }
- x := &paintClientRequestRTCClient{stream}
- return x, nil
- }
- type PaintClient_RequestRTCClient interface {
- Send(*RTCData) error
- Recv() (*RTCData, error)
- grpc.ClientStream
- }
- type paintClientRequestRTCClient struct {
- grpc.ClientStream
- }
- func (x *paintClientRequestRTCClient) Send(m *RTCData) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *paintClientRequestRTCClient) Recv() (*RTCData, error) {
- m := new(RTCData)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- // PaintClientServer is the server API for PaintClient service.
- // All implementations must embed UnimplementedPaintClientServer
- // for forward compatibility
- type PaintClientServer interface {
- // Sends a greeting
- Paint(context.Context, *PaintRequest) (*PaintReply, error)
- Monitor(*MonitorSub, PaintClient_MonitorServer) error
- RequestRTC(PaintClient_RequestRTCServer) error
- mustEmbedUnimplementedPaintClientServer()
- }
- // UnimplementedPaintClientServer must be embedded to have forward compatible implementations.
- type UnimplementedPaintClientServer struct {
- }
- func (UnimplementedPaintClientServer) Paint(context.Context, *PaintRequest) (*PaintReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Paint not implemented")
- }
- func (UnimplementedPaintClientServer) Monitor(*MonitorSub, PaintClient_MonitorServer) error {
- return status.Errorf(codes.Unimplemented, "method Monitor not implemented")
- }
- func (UnimplementedPaintClientServer) RequestRTC(PaintClient_RequestRTCServer) error {
- return status.Errorf(codes.Unimplemented, "method RequestRTC not implemented")
- }
- func (UnimplementedPaintClientServer) mustEmbedUnimplementedPaintClientServer() {}
- // UnsafePaintClientServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to PaintClientServer will
- // result in compilation errors.
- type UnsafePaintClientServer interface {
- mustEmbedUnimplementedPaintClientServer()
- }
- func RegisterPaintClientServer(s grpc.ServiceRegistrar, srv PaintClientServer) {
- s.RegisterService(&PaintClient_ServiceDesc, srv)
- }
- func _PaintClient_Paint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(PaintRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(PaintClientServer).Paint(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/PaintClient/Paint",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(PaintClientServer).Paint(ctx, req.(*PaintRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _PaintClient_Monitor_Handler(srv interface{}, stream grpc.ServerStream) error {
- m := new(MonitorSub)
- if err := stream.RecvMsg(m); err != nil {
- return err
- }
- return srv.(PaintClientServer).Monitor(m, &paintClientMonitorServer{stream})
- }
- type PaintClient_MonitorServer interface {
- Send(*MonitorReply) error
- grpc.ServerStream
- }
- type paintClientMonitorServer struct {
- grpc.ServerStream
- }
- func (x *paintClientMonitorServer) Send(m *MonitorReply) error {
- return x.ServerStream.SendMsg(m)
- }
- func _PaintClient_RequestRTC_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(PaintClientServer).RequestRTC(&paintClientRequestRTCServer{stream})
- }
- type PaintClient_RequestRTCServer interface {
- Send(*RTCData) error
- Recv() (*RTCData, error)
- grpc.ServerStream
- }
- type paintClientRequestRTCServer struct {
- grpc.ServerStream
- }
- func (x *paintClientRequestRTCServer) Send(m *RTCData) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *paintClientRequestRTCServer) Recv() (*RTCData, error) {
- m := new(RTCData)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- // PaintClient_ServiceDesc is the grpc.ServiceDesc for PaintClient service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var PaintClient_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "PaintClient",
- HandlerType: (*PaintClientServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "Paint",
- Handler: _PaintClient_Paint_Handler,
- },
- },
- Streams: []grpc.StreamDesc{
- {
- StreamName: "Monitor",
- Handler: _PaintClient_Monitor_Handler,
- ServerStreams: true,
- },
- {
- StreamName: "RequestRTC",
- Handler: _PaintClient_RequestRTC_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "protos/client.proto",
- }
|