-
Notifications
You must be signed in to change notification settings - Fork 1
/
broker_service.pb.client.go
172 lines (146 loc) · 5.12 KB
/
broker_service.pb.client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// Code generated by protoc-gen-goten-client
// API: BrokerService
// DO NOT EDIT!!!
package broker_client
import (
"context"
"google.golang.org/grpc"
"google.golang.org/protobuf/runtime/protoimpl"
)
// proto imports
import (
device "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha/device"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = protoimpl.DescBuilder{}
_ = new(context.Context)
_ = grpc.ClientConn{}
)
// make sure we're using proto imports
var (
_ = &device.Device{}
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// BrokerServiceClient is the client API for BrokerService.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BrokerServiceClient interface {
ListenForConnections(ctx context.Context, opts ...grpc.CallOption) (ListenForConnectionsClientStream, error)
OpenConnectionChannelSocket(ctx context.Context, opts ...grpc.CallOption) (OpenConnectionChannelSocketClientStream, error)
ConnectToDevice(ctx context.Context, opts ...grpc.CallOption) (ConnectToDeviceClientStream, error)
}
type client struct {
cc grpc.ClientConnInterface
}
func NewBrokerServiceClient(cc grpc.ClientConnInterface) BrokerServiceClient {
return &client{cc}
}
func (c *client) ListenForConnections(ctx context.Context, opts ...grpc.CallOption) (ListenForConnectionsClientStream, error) {
stream, err := c.cc.NewStream(ctx,
&grpc.StreamDesc{
StreamName: "ListenForConnections",
ServerStreams: true,
ClientStreams: true,
},
"/ntt.devices.v1alpha.BrokerService/ListenForConnections", opts...)
if err != nil {
return nil, err
}
x := &listenForConnectionsListenForConnectionsClient{stream}
return x, nil
}
type ListenForConnectionsClientStream interface {
Send(*ListenForConnectionsRequest) error
Recv() (*ListenForConnectionsResponse, error)
grpc.ClientStream
}
type listenForConnectionsListenForConnectionsClient struct {
grpc.ClientStream
}
func (x *listenForConnectionsListenForConnectionsClient) Send(m *ListenForConnectionsRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *listenForConnectionsListenForConnectionsClient) Recv() (*ListenForConnectionsResponse, error) {
m := new(ListenForConnectionsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *client) OpenConnectionChannelSocket(ctx context.Context, opts ...grpc.CallOption) (OpenConnectionChannelSocketClientStream, error) {
stream, err := c.cc.NewStream(ctx,
&grpc.StreamDesc{
StreamName: "OpenConnectionChannelSocket",
ServerStreams: true,
ClientStreams: true,
},
"/ntt.devices.v1alpha.BrokerService/OpenConnectionChannelSocket", opts...)
if err != nil {
return nil, err
}
x := &openConnectionChannelSocketOpenConnectionChannelSocketClient{stream}
return x, nil
}
type OpenConnectionChannelSocketClientStream interface {
Send(*OpenConnectionChannelSocketRequest) error
Recv() (*OpenConnectionChannelSocketResponse, error)
grpc.ClientStream
}
type openConnectionChannelSocketOpenConnectionChannelSocketClient struct {
grpc.ClientStream
}
func (x *openConnectionChannelSocketOpenConnectionChannelSocketClient) Send(m *OpenConnectionChannelSocketRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *openConnectionChannelSocketOpenConnectionChannelSocketClient) Recv() (*OpenConnectionChannelSocketResponse, error) {
m := new(OpenConnectionChannelSocketResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *client) ConnectToDevice(ctx context.Context, opts ...grpc.CallOption) (ConnectToDeviceClientStream, error) {
stream, err := c.cc.NewStream(ctx,
&grpc.StreamDesc{
StreamName: "ConnectToDevice",
ServerStreams: true,
ClientStreams: true,
},
"/ntt.devices.v1alpha.BrokerService/ConnectToDevice", opts...)
if err != nil {
return nil, err
}
x := &connectToDeviceConnectToDeviceClient{stream}
return x, nil
}
type ConnectToDeviceClientStream interface {
Send(*ConnectToDeviceRequest) error
Recv() (*ConnectToDeviceResponse, error)
grpc.ClientStream
}
type connectToDeviceConnectToDeviceClient struct {
grpc.ClientStream
}
func (x *connectToDeviceConnectToDeviceClient) Send(m *ConnectToDeviceRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *connectToDeviceConnectToDeviceClient) Recv() (*ConnectToDeviceResponse, error) {
m := new(ConnectToDeviceResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}