-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
telem_wsrpc.pb.go
88 lines (75 loc) · 2.31 KB
/
telem_wsrpc.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
// Code generated by protoc-gen-go-wsrpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-wsrpc v0.0.1
// - protoc v3.21.12
package telem
import (
context "context"
wsrpc "github.com/smartcontractkit/wsrpc"
)
// TelemClient is the client API for Telem service.
type TelemClient interface {
Telem(ctx context.Context, in *TelemRequest) (*TelemResponse, error)
TelemBatch(ctx context.Context, in *TelemBatchRequest) (*TelemResponse, error)
}
type telemClient struct {
cc wsrpc.ClientInterface
}
func NewTelemClient(cc wsrpc.ClientInterface) TelemClient {
return &telemClient{cc}
}
func (c *telemClient) Telem(ctx context.Context, in *TelemRequest) (*TelemResponse, error) {
out := new(TelemResponse)
err := c.cc.Invoke(ctx, "Telem", in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *telemClient) TelemBatch(ctx context.Context, in *TelemBatchRequest) (*TelemResponse, error) {
out := new(TelemResponse)
err := c.cc.Invoke(ctx, "TelemBatch", in, out)
if err != nil {
return nil, err
}
return out, nil
}
// TelemServer is the server API for Telem service.
type TelemServer interface {
Telem(context.Context, *TelemRequest) (*TelemResponse, error)
TelemBatch(context.Context, *TelemBatchRequest) (*TelemResponse, error)
}
func RegisterTelemServer(s wsrpc.ServiceRegistrar, srv TelemServer) {
s.RegisterService(&Telem_ServiceDesc, srv)
}
func _Telem_Telem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(TelemRequest)
if err := dec(in); err != nil {
return nil, err
}
return srv.(TelemServer).Telem(ctx, in)
}
func _Telem_TelemBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(TelemBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
return srv.(TelemServer).TelemBatch(ctx, in)
}
// Telem_ServiceDesc is the wsrpc.ServiceDesc for Telem service.
// It's only intended for direct use with wsrpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Telem_ServiceDesc = wsrpc.ServiceDesc{
ServiceName: "telem.Telem",
HandlerType: (*TelemServer)(nil),
Methods: []wsrpc.MethodDesc{
{
MethodName: "Telem",
Handler: _Telem_Telem_Handler,
},
{
MethodName: "TelemBatch",
Handler: _Telem_TelemBatch_Handler,
},
},
}