-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgeyser_grpc.pb.go
508 lines (446 loc) · 18.2 KB
/
geyser_grpc.pb.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.12.4
// source: geyser.proto
package geyser
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
// GeyserClient is the client API for Geyser 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 GeyserClient interface {
// Invoke to get the expected heartbeat interval.
GetHeartbeatInterval(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GetHeartbeatIntervalResponse, error)
// Subscribes to account updates in the accounts database; additionally pings clients with empty heartbeats.
// Upon initially connecting the client can expect a `highest_write_slot` set in the http headers.
// Subscribe to account updates
SubscribeAccountUpdates(ctx context.Context, in *SubscribeAccountUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeAccountUpdatesClient, error)
// Subscribes to updates given a list of program IDs. When an account update comes in that's owned by a provided
// program id, one will receive an update
SubscribeProgramUpdates(ctx context.Context, in *SubscribeProgramsUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeProgramUpdatesClient, error)
// Functions similarly to `SubscribeAccountUpdates`, but consumes less bandwidth.
// Returns the highest slot seen thus far in the http headers named `highest-write-slot`.
SubscribePartialAccountUpdates(ctx context.Context, in *SubscribePartialAccountUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribePartialAccountUpdatesClient, error)
// Subscribes to slot updates.
// Returns the highest slot seen thus far in the http headers named `highest-write-slot`.
SubscribeSlotUpdates(ctx context.Context, in *SubscribeSlotUpdateRequest, opts ...grpc.CallOption) (Geyser_SubscribeSlotUpdatesClient, error)
// Subscribes to transaction updates.
SubscribeTransactionUpdates(ctx context.Context, in *SubscribeTransactionUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeTransactionUpdatesClient, error)
// Subscribes to block updates.
SubscribeBlockUpdates(ctx context.Context, in *SubscribeBlockUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeBlockUpdatesClient, error)
}
type geyserClient struct {
cc grpc.ClientConnInterface
}
func NewGeyserClient(cc grpc.ClientConnInterface) GeyserClient {
return &geyserClient{cc}
}
func (c *geyserClient) GetHeartbeatInterval(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GetHeartbeatIntervalResponse, error) {
out := new(GetHeartbeatIntervalResponse)
err := c.cc.Invoke(ctx, "/solana.geyser.Geyser/GetHeartbeatInterval", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *geyserClient) SubscribeAccountUpdates(ctx context.Context, in *SubscribeAccountUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeAccountUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[0], "/solana.geyser.Geyser/SubscribeAccountUpdates", opts...)
if err != nil {
return nil, err
}
x := &geyserSubscribeAccountUpdatesClient{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 Geyser_SubscribeAccountUpdatesClient interface {
Recv() (*TimestampedAccountUpdate, error)
grpc.ClientStream
}
type geyserSubscribeAccountUpdatesClient struct {
grpc.ClientStream
}
func (x *geyserSubscribeAccountUpdatesClient) Recv() (*TimestampedAccountUpdate, error) {
m := new(TimestampedAccountUpdate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *geyserClient) SubscribeProgramUpdates(ctx context.Context, in *SubscribeProgramsUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeProgramUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[1], "/solana.geyser.Geyser/SubscribeProgramUpdates", opts...)
if err != nil {
return nil, err
}
x := &geyserSubscribeProgramUpdatesClient{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 Geyser_SubscribeProgramUpdatesClient interface {
Recv() (*TimestampedAccountUpdate, error)
grpc.ClientStream
}
type geyserSubscribeProgramUpdatesClient struct {
grpc.ClientStream
}
func (x *geyserSubscribeProgramUpdatesClient) Recv() (*TimestampedAccountUpdate, error) {
m := new(TimestampedAccountUpdate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *geyserClient) SubscribePartialAccountUpdates(ctx context.Context, in *SubscribePartialAccountUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribePartialAccountUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[2], "/solana.geyser.Geyser/SubscribePartialAccountUpdates", opts...)
if err != nil {
return nil, err
}
x := &geyserSubscribePartialAccountUpdatesClient{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 Geyser_SubscribePartialAccountUpdatesClient interface {
Recv() (*MaybePartialAccountUpdate, error)
grpc.ClientStream
}
type geyserSubscribePartialAccountUpdatesClient struct {
grpc.ClientStream
}
func (x *geyserSubscribePartialAccountUpdatesClient) Recv() (*MaybePartialAccountUpdate, error) {
m := new(MaybePartialAccountUpdate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *geyserClient) SubscribeSlotUpdates(ctx context.Context, in *SubscribeSlotUpdateRequest, opts ...grpc.CallOption) (Geyser_SubscribeSlotUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[3], "/solana.geyser.Geyser/SubscribeSlotUpdates", opts...)
if err != nil {
return nil, err
}
x := &geyserSubscribeSlotUpdatesClient{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 Geyser_SubscribeSlotUpdatesClient interface {
Recv() (*TimestampedSlotUpdate, error)
grpc.ClientStream
}
type geyserSubscribeSlotUpdatesClient struct {
grpc.ClientStream
}
func (x *geyserSubscribeSlotUpdatesClient) Recv() (*TimestampedSlotUpdate, error) {
m := new(TimestampedSlotUpdate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *geyserClient) SubscribeTransactionUpdates(ctx context.Context, in *SubscribeTransactionUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeTransactionUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[4], "/solana.geyser.Geyser/SubscribeTransactionUpdates", opts...)
if err != nil {
return nil, err
}
x := &geyserSubscribeTransactionUpdatesClient{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 Geyser_SubscribeTransactionUpdatesClient interface {
Recv() (*TimestampedTransactionUpdate, error)
grpc.ClientStream
}
type geyserSubscribeTransactionUpdatesClient struct {
grpc.ClientStream
}
func (x *geyserSubscribeTransactionUpdatesClient) Recv() (*TimestampedTransactionUpdate, error) {
m := new(TimestampedTransactionUpdate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *geyserClient) SubscribeBlockUpdates(ctx context.Context, in *SubscribeBlockUpdatesRequest, opts ...grpc.CallOption) (Geyser_SubscribeBlockUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &Geyser_ServiceDesc.Streams[5], "/solana.geyser.Geyser/SubscribeBlockUpdates", opts...)
if err != nil {
return nil, err
}
x := &geyserSubscribeBlockUpdatesClient{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 Geyser_SubscribeBlockUpdatesClient interface {
Recv() (*TimestampedBlockUpdate, error)
grpc.ClientStream
}
type geyserSubscribeBlockUpdatesClient struct {
grpc.ClientStream
}
func (x *geyserSubscribeBlockUpdatesClient) Recv() (*TimestampedBlockUpdate, error) {
m := new(TimestampedBlockUpdate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// GeyserServer is the server API for Geyser service.
// All implementations must embed UnimplementedGeyserServer
// for forward compatibility
type GeyserServer interface {
// Invoke to get the expected heartbeat interval.
GetHeartbeatInterval(context.Context, *EmptyRequest) (*GetHeartbeatIntervalResponse, error)
// Subscribes to account updates in the accounts database; additionally pings clients with empty heartbeats.
// Upon initially connecting the client can expect a `highest_write_slot` set in the http headers.
// Subscribe to account updates
SubscribeAccountUpdates(*SubscribeAccountUpdatesRequest, Geyser_SubscribeAccountUpdatesServer) error
// Subscribes to updates given a list of program IDs. When an account update comes in that's owned by a provided
// program id, one will receive an update
SubscribeProgramUpdates(*SubscribeProgramsUpdatesRequest, Geyser_SubscribeProgramUpdatesServer) error
// Functions similarly to `SubscribeAccountUpdates`, but consumes less bandwidth.
// Returns the highest slot seen thus far in the http headers named `highest-write-slot`.
SubscribePartialAccountUpdates(*SubscribePartialAccountUpdatesRequest, Geyser_SubscribePartialAccountUpdatesServer) error
// Subscribes to slot updates.
// Returns the highest slot seen thus far in the http headers named `highest-write-slot`.
SubscribeSlotUpdates(*SubscribeSlotUpdateRequest, Geyser_SubscribeSlotUpdatesServer) error
// Subscribes to transaction updates.
SubscribeTransactionUpdates(*SubscribeTransactionUpdatesRequest, Geyser_SubscribeTransactionUpdatesServer) error
// Subscribes to block updates.
SubscribeBlockUpdates(*SubscribeBlockUpdatesRequest, Geyser_SubscribeBlockUpdatesServer) error
mustEmbedUnimplementedGeyserServer()
}
// UnimplementedGeyserServer must be embedded to have forward compatible implementations.
type UnimplementedGeyserServer struct {
}
func (UnimplementedGeyserServer) GetHeartbeatInterval(context.Context, *EmptyRequest) (*GetHeartbeatIntervalResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHeartbeatInterval not implemented")
}
func (UnimplementedGeyserServer) SubscribeAccountUpdates(*SubscribeAccountUpdatesRequest, Geyser_SubscribeAccountUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeAccountUpdates not implemented")
}
func (UnimplementedGeyserServer) SubscribeProgramUpdates(*SubscribeProgramsUpdatesRequest, Geyser_SubscribeProgramUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeProgramUpdates not implemented")
}
func (UnimplementedGeyserServer) SubscribePartialAccountUpdates(*SubscribePartialAccountUpdatesRequest, Geyser_SubscribePartialAccountUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribePartialAccountUpdates not implemented")
}
func (UnimplementedGeyserServer) SubscribeSlotUpdates(*SubscribeSlotUpdateRequest, Geyser_SubscribeSlotUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeSlotUpdates not implemented")
}
func (UnimplementedGeyserServer) SubscribeTransactionUpdates(*SubscribeTransactionUpdatesRequest, Geyser_SubscribeTransactionUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeTransactionUpdates not implemented")
}
func (UnimplementedGeyserServer) SubscribeBlockUpdates(*SubscribeBlockUpdatesRequest, Geyser_SubscribeBlockUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeBlockUpdates not implemented")
}
func (UnimplementedGeyserServer) mustEmbedUnimplementedGeyserServer() {}
// UnsafeGeyserServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GeyserServer will
// result in compilation errors.
type UnsafeGeyserServer interface {
mustEmbedUnimplementedGeyserServer()
}
func RegisterGeyserServer(s grpc.ServiceRegistrar, srv GeyserServer) {
s.RegisterService(&Geyser_ServiceDesc, srv)
}
func _Geyser_GetHeartbeatInterval_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EmptyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GeyserServer).GetHeartbeatInterval(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/solana.geyser.Geyser/GetHeartbeatInterval",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GeyserServer).GetHeartbeatInterval(ctx, req.(*EmptyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Geyser_SubscribeAccountUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeAccountUpdatesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(GeyserServer).SubscribeAccountUpdates(m, &geyserSubscribeAccountUpdatesServer{stream})
}
type Geyser_SubscribeAccountUpdatesServer interface {
Send(*TimestampedAccountUpdate) error
grpc.ServerStream
}
type geyserSubscribeAccountUpdatesServer struct {
grpc.ServerStream
}
func (x *geyserSubscribeAccountUpdatesServer) Send(m *TimestampedAccountUpdate) error {
return x.ServerStream.SendMsg(m)
}
func _Geyser_SubscribeProgramUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeProgramsUpdatesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(GeyserServer).SubscribeProgramUpdates(m, &geyserSubscribeProgramUpdatesServer{stream})
}
type Geyser_SubscribeProgramUpdatesServer interface {
Send(*TimestampedAccountUpdate) error
grpc.ServerStream
}
type geyserSubscribeProgramUpdatesServer struct {
grpc.ServerStream
}
func (x *geyserSubscribeProgramUpdatesServer) Send(m *TimestampedAccountUpdate) error {
return x.ServerStream.SendMsg(m)
}
func _Geyser_SubscribePartialAccountUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribePartialAccountUpdatesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(GeyserServer).SubscribePartialAccountUpdates(m, &geyserSubscribePartialAccountUpdatesServer{stream})
}
type Geyser_SubscribePartialAccountUpdatesServer interface {
Send(*MaybePartialAccountUpdate) error
grpc.ServerStream
}
type geyserSubscribePartialAccountUpdatesServer struct {
grpc.ServerStream
}
func (x *geyserSubscribePartialAccountUpdatesServer) Send(m *MaybePartialAccountUpdate) error {
return x.ServerStream.SendMsg(m)
}
func _Geyser_SubscribeSlotUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeSlotUpdateRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(GeyserServer).SubscribeSlotUpdates(m, &geyserSubscribeSlotUpdatesServer{stream})
}
type Geyser_SubscribeSlotUpdatesServer interface {
Send(*TimestampedSlotUpdate) error
grpc.ServerStream
}
type geyserSubscribeSlotUpdatesServer struct {
grpc.ServerStream
}
func (x *geyserSubscribeSlotUpdatesServer) Send(m *TimestampedSlotUpdate) error {
return x.ServerStream.SendMsg(m)
}
func _Geyser_SubscribeTransactionUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeTransactionUpdatesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(GeyserServer).SubscribeTransactionUpdates(m, &geyserSubscribeTransactionUpdatesServer{stream})
}
type Geyser_SubscribeTransactionUpdatesServer interface {
Send(*TimestampedTransactionUpdate) error
grpc.ServerStream
}
type geyserSubscribeTransactionUpdatesServer struct {
grpc.ServerStream
}
func (x *geyserSubscribeTransactionUpdatesServer) Send(m *TimestampedTransactionUpdate) error {
return x.ServerStream.SendMsg(m)
}
func _Geyser_SubscribeBlockUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeBlockUpdatesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(GeyserServer).SubscribeBlockUpdates(m, &geyserSubscribeBlockUpdatesServer{stream})
}
type Geyser_SubscribeBlockUpdatesServer interface {
Send(*TimestampedBlockUpdate) error
grpc.ServerStream
}
type geyserSubscribeBlockUpdatesServer struct {
grpc.ServerStream
}
func (x *geyserSubscribeBlockUpdatesServer) Send(m *TimestampedBlockUpdate) error {
return x.ServerStream.SendMsg(m)
}
// Geyser_ServiceDesc is the grpc.ServiceDesc for Geyser service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Geyser_ServiceDesc = grpc.ServiceDesc{
ServiceName: "solana.geyser.Geyser",
HandlerType: (*GeyserServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetHeartbeatInterval",
Handler: _Geyser_GetHeartbeatInterval_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "SubscribeAccountUpdates",
Handler: _Geyser_SubscribeAccountUpdates_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribeProgramUpdates",
Handler: _Geyser_SubscribeProgramUpdates_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribePartialAccountUpdates",
Handler: _Geyser_SubscribePartialAccountUpdates_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribeSlotUpdates",
Handler: _Geyser_SubscribeSlotUpdates_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribeTransactionUpdates",
Handler: _Geyser_SubscribeTransactionUpdates_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribeBlockUpdates",
Handler: _Geyser_SubscribeBlockUpdates_Handler,
ServerStreams: true,
},
},
Metadata: "geyser.proto",
}