github.com/cloudwan/edgelq-sdk@v1.15.4/meta/client/v1alpha2/deployment/deployment_service.pb.client.go (about) 1 // Code generated by protoc-gen-goten-client 2 // API: DeploymentService 3 // DO NOT EDIT!!! 4 5 package deployment_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 deployment "github.com/cloudwan/edgelq-sdk/meta/resources/v1alpha2/deployment" 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 _ = &deployment.Deployment{} 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 // DeploymentServiceClient is the client API for DeploymentService. 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 DeploymentServiceClient interface { 50 GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*deployment.Deployment, error) 51 BatchGetDeployments(ctx context.Context, in *BatchGetDeploymentsRequest, opts ...grpc.CallOption) (*BatchGetDeploymentsResponse, error) 52 ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) 53 WatchDeployment(ctx context.Context, in *WatchDeploymentRequest, opts ...grpc.CallOption) (WatchDeploymentClientStream, error) 54 WatchDeployments(ctx context.Context, in *WatchDeploymentsRequest, opts ...grpc.CallOption) (WatchDeploymentsClientStream, error) 55 } 56 57 type client struct { 58 cc grpc.ClientConnInterface 59 } 60 61 func NewDeploymentServiceClient(cc grpc.ClientConnInterface) DeploymentServiceClient { 62 return &client{cc} 63 } 64 65 func (c *client) GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*deployment.Deployment, error) { 66 out := new(deployment.Deployment) 67 err := c.cc.Invoke(ctx, "/ntt.meta.v1alpha2.DeploymentService/GetDeployment", in, out, opts...) 68 if err != nil { 69 return nil, err 70 } 71 return out, nil 72 } 73 74 func (c *client) BatchGetDeployments(ctx context.Context, in *BatchGetDeploymentsRequest, opts ...grpc.CallOption) (*BatchGetDeploymentsResponse, error) { 75 out := new(BatchGetDeploymentsResponse) 76 err := c.cc.Invoke(ctx, "/ntt.meta.v1alpha2.DeploymentService/BatchGetDeployments", in, out, opts...) 77 if err != nil { 78 return nil, err 79 } 80 return out, nil 81 } 82 83 func (c *client) ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) { 84 out := new(ListDeploymentsResponse) 85 err := c.cc.Invoke(ctx, "/ntt.meta.v1alpha2.DeploymentService/ListDeployments", in, out, opts...) 86 if err != nil { 87 return nil, err 88 } 89 return out, nil 90 } 91 92 func (c *client) WatchDeployment(ctx context.Context, in *WatchDeploymentRequest, opts ...grpc.CallOption) (WatchDeploymentClientStream, error) { 93 stream, err := c.cc.NewStream(ctx, 94 &grpc.StreamDesc{ 95 StreamName: "WatchDeployment", 96 ServerStreams: true, 97 }, 98 "/ntt.meta.v1alpha2.DeploymentService/WatchDeployment", opts...) 99 if err != nil { 100 return nil, err 101 } 102 x := &watchDeploymentWatchDeploymentClient{stream} 103 if err := x.ClientStream.SendMsg(in); err != nil { 104 return nil, err 105 } 106 if err := x.ClientStream.CloseSend(); err != nil { 107 return nil, err 108 } 109 return x, nil 110 } 111 112 type WatchDeploymentClientStream interface { 113 Recv() (*WatchDeploymentResponse, error) 114 grpc.ClientStream 115 } 116 117 type watchDeploymentWatchDeploymentClient struct { 118 grpc.ClientStream 119 } 120 121 func (x *watchDeploymentWatchDeploymentClient) Recv() (*WatchDeploymentResponse, error) { 122 m := new(WatchDeploymentResponse) 123 if err := x.ClientStream.RecvMsg(m); err != nil { 124 return nil, err 125 } 126 return m, nil 127 } 128 129 func (c *client) WatchDeployments(ctx context.Context, in *WatchDeploymentsRequest, opts ...grpc.CallOption) (WatchDeploymentsClientStream, error) { 130 stream, err := c.cc.NewStream(ctx, 131 &grpc.StreamDesc{ 132 StreamName: "WatchDeployments", 133 ServerStreams: true, 134 }, 135 "/ntt.meta.v1alpha2.DeploymentService/WatchDeployments", opts...) 136 if err != nil { 137 return nil, err 138 } 139 x := &watchDeploymentsWatchDeploymentsClient{stream} 140 if err := x.ClientStream.SendMsg(in); err != nil { 141 return nil, err 142 } 143 if err := x.ClientStream.CloseSend(); err != nil { 144 return nil, err 145 } 146 return x, nil 147 } 148 149 type WatchDeploymentsClientStream interface { 150 Recv() (*WatchDeploymentsResponse, error) 151 grpc.ClientStream 152 } 153 154 type watchDeploymentsWatchDeploymentsClient struct { 155 grpc.ClientStream 156 } 157 158 func (x *watchDeploymentsWatchDeploymentsClient) Recv() (*WatchDeploymentsResponse, error) { 159 m := new(WatchDeploymentsResponse) 160 if err := x.ClientStream.RecvMsg(m); err != nil { 161 return nil, err 162 } 163 return m, nil 164 }