/
bertyreplication_grpc.pb.go
185 lines (166 loc) · 7.97 KB
/
bertyreplication_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
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: replicationtypes/bertyreplication.proto
package replicationtypes
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
const (
ReplicationService_ReplicateGroup_FullMethodName = "/weshnet.replication.v1.ReplicationService/ReplicateGroup"
ReplicationService_ReplicateGlobalStats_FullMethodName = "/weshnet.replication.v1.ReplicationService/ReplicateGlobalStats"
ReplicationService_ReplicateGroupStats_FullMethodName = "/weshnet.replication.v1.ReplicationService/ReplicateGroupStats"
)
// ReplicationServiceClient is the client API for ReplicationService 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 ReplicationServiceClient interface {
// ReplicateGroup
ReplicateGroup(ctx context.Context, in *ReplicationServiceReplicateGroup_Request, opts ...grpc.CallOption) (*ReplicationServiceReplicateGroup_Reply, error)
ReplicateGlobalStats(ctx context.Context, in *ReplicateGlobalStats_Request, opts ...grpc.CallOption) (*ReplicateGlobalStats_Reply, error)
ReplicateGroupStats(ctx context.Context, in *ReplicateGroupStats_Request, opts ...grpc.CallOption) (*ReplicateGroupStats_Reply, error)
}
type replicationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewReplicationServiceClient(cc grpc.ClientConnInterface) ReplicationServiceClient {
return &replicationServiceClient{cc}
}
func (c *replicationServiceClient) ReplicateGroup(ctx context.Context, in *ReplicationServiceReplicateGroup_Request, opts ...grpc.CallOption) (*ReplicationServiceReplicateGroup_Reply, error) {
out := new(ReplicationServiceReplicateGroup_Reply)
err := c.cc.Invoke(ctx, ReplicationService_ReplicateGroup_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *replicationServiceClient) ReplicateGlobalStats(ctx context.Context, in *ReplicateGlobalStats_Request, opts ...grpc.CallOption) (*ReplicateGlobalStats_Reply, error) {
out := new(ReplicateGlobalStats_Reply)
err := c.cc.Invoke(ctx, ReplicationService_ReplicateGlobalStats_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *replicationServiceClient) ReplicateGroupStats(ctx context.Context, in *ReplicateGroupStats_Request, opts ...grpc.CallOption) (*ReplicateGroupStats_Reply, error) {
out := new(ReplicateGroupStats_Reply)
err := c.cc.Invoke(ctx, ReplicationService_ReplicateGroupStats_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ReplicationServiceServer is the server API for ReplicationService service.
// All implementations must embed UnimplementedReplicationServiceServer
// for forward compatibility
type ReplicationServiceServer interface {
// ReplicateGroup
ReplicateGroup(context.Context, *ReplicationServiceReplicateGroup_Request) (*ReplicationServiceReplicateGroup_Reply, error)
ReplicateGlobalStats(context.Context, *ReplicateGlobalStats_Request) (*ReplicateGlobalStats_Reply, error)
ReplicateGroupStats(context.Context, *ReplicateGroupStats_Request) (*ReplicateGroupStats_Reply, error)
mustEmbedUnimplementedReplicationServiceServer()
}
// UnimplementedReplicationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedReplicationServiceServer struct {
}
func (UnimplementedReplicationServiceServer) ReplicateGroup(context.Context, *ReplicationServiceReplicateGroup_Request) (*ReplicationServiceReplicateGroup_Reply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicateGroup not implemented")
}
func (UnimplementedReplicationServiceServer) ReplicateGlobalStats(context.Context, *ReplicateGlobalStats_Request) (*ReplicateGlobalStats_Reply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicateGlobalStats not implemented")
}
func (UnimplementedReplicationServiceServer) ReplicateGroupStats(context.Context, *ReplicateGroupStats_Request) (*ReplicateGroupStats_Reply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicateGroupStats not implemented")
}
func (UnimplementedReplicationServiceServer) mustEmbedUnimplementedReplicationServiceServer() {}
// UnsafeReplicationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ReplicationServiceServer will
// result in compilation errors.
type UnsafeReplicationServiceServer interface {
mustEmbedUnimplementedReplicationServiceServer()
}
func RegisterReplicationServiceServer(s grpc.ServiceRegistrar, srv ReplicationServiceServer) {
s.RegisterService(&ReplicationService_ServiceDesc, srv)
}
func _ReplicationService_ReplicateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplicationServiceReplicateGroup_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReplicationServiceServer).ReplicateGroup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ReplicationService_ReplicateGroup_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServiceServer).ReplicateGroup(ctx, req.(*ReplicationServiceReplicateGroup_Request))
}
return interceptor(ctx, in, info, handler)
}
func _ReplicationService_ReplicateGlobalStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplicateGlobalStats_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReplicationServiceServer).ReplicateGlobalStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ReplicationService_ReplicateGlobalStats_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServiceServer).ReplicateGlobalStats(ctx, req.(*ReplicateGlobalStats_Request))
}
return interceptor(ctx, in, info, handler)
}
func _ReplicationService_ReplicateGroupStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplicateGroupStats_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReplicationServiceServer).ReplicateGroupStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ReplicationService_ReplicateGroupStats_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServiceServer).ReplicateGroupStats(ctx, req.(*ReplicateGroupStats_Request))
}
return interceptor(ctx, in, info, handler)
}
// ReplicationService_ServiceDesc is the grpc.ServiceDesc for ReplicationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ReplicationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "weshnet.replication.v1.ReplicationService",
HandlerType: (*ReplicationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ReplicateGroup",
Handler: _ReplicationService_ReplicateGroup_Handler,
},
{
MethodName: "ReplicateGlobalStats",
Handler: _ReplicationService_ReplicateGlobalStats_Handler,
},
{
MethodName: "ReplicateGroupStats",
Handler: _ReplicationService_ReplicateGroupStats_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "replicationtypes/bertyreplication.proto",
}