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
|
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: transaction.proto
package gitalypb
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// 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 _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// The outcome of the given transaction telling the client whether the
// transaction should be committed or rolled back.
type VoteTransactionResponse_TransactionState int32
const (
VoteTransactionResponse_COMMIT VoteTransactionResponse_TransactionState = 0
VoteTransactionResponse_ABORT VoteTransactionResponse_TransactionState = 1
)
var VoteTransactionResponse_TransactionState_name = map[int32]string{
0: "COMMIT",
1: "ABORT",
}
var VoteTransactionResponse_TransactionState_value = map[string]int32{
"COMMIT": 0,
"ABORT": 1,
}
func (x VoteTransactionResponse_TransactionState) String() string {
return proto.EnumName(VoteTransactionResponse_TransactionState_name, int32(x))
}
func (VoteTransactionResponse_TransactionState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_2cc4e03d2c28c490, []int{1, 0}
}
type VoteTransactionRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
// ID of the transaction we're processing
TransactionId uint64 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
// Name of the Gitaly node that's voting on a transaction.
Node string `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"`
// SHA1 of the references that are to be updated
ReferenceUpdatesHash []byte `protobuf:"bytes,4,opt,name=reference_updates_hash,json=referenceUpdatesHash,proto3" json:"reference_updates_hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoteTransactionRequest) Reset() { *m = VoteTransactionRequest{} }
func (m *VoteTransactionRequest) String() string { return proto.CompactTextString(m) }
func (*VoteTransactionRequest) ProtoMessage() {}
func (*VoteTransactionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2cc4e03d2c28c490, []int{0}
}
func (m *VoteTransactionRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteTransactionRequest.Unmarshal(m, b)
}
func (m *VoteTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoteTransactionRequest.Marshal(b, m, deterministic)
}
func (m *VoteTransactionRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoteTransactionRequest.Merge(m, src)
}
func (m *VoteTransactionRequest) XXX_Size() int {
return xxx_messageInfo_VoteTransactionRequest.Size(m)
}
func (m *VoteTransactionRequest) XXX_DiscardUnknown() {
xxx_messageInfo_VoteTransactionRequest.DiscardUnknown(m)
}
var xxx_messageInfo_VoteTransactionRequest proto.InternalMessageInfo
func (m *VoteTransactionRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *VoteTransactionRequest) GetTransactionId() uint64 {
if m != nil {
return m.TransactionId
}
return 0
}
func (m *VoteTransactionRequest) GetNode() string {
if m != nil {
return m.Node
}
return ""
}
func (m *VoteTransactionRequest) GetReferenceUpdatesHash() []byte {
if m != nil {
return m.ReferenceUpdatesHash
}
return nil
}
type VoteTransactionResponse struct {
State VoteTransactionResponse_TransactionState `protobuf:"varint,1,opt,name=state,proto3,enum=gitaly.VoteTransactionResponse_TransactionState" json:"state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoteTransactionResponse) Reset() { *m = VoteTransactionResponse{} }
func (m *VoteTransactionResponse) String() string { return proto.CompactTextString(m) }
func (*VoteTransactionResponse) ProtoMessage() {}
func (*VoteTransactionResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_2cc4e03d2c28c490, []int{1}
}
func (m *VoteTransactionResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteTransactionResponse.Unmarshal(m, b)
}
func (m *VoteTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoteTransactionResponse.Marshal(b, m, deterministic)
}
func (m *VoteTransactionResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoteTransactionResponse.Merge(m, src)
}
func (m *VoteTransactionResponse) XXX_Size() int {
return xxx_messageInfo_VoteTransactionResponse.Size(m)
}
func (m *VoteTransactionResponse) XXX_DiscardUnknown() {
xxx_messageInfo_VoteTransactionResponse.DiscardUnknown(m)
}
var xxx_messageInfo_VoteTransactionResponse proto.InternalMessageInfo
func (m *VoteTransactionResponse) GetState() VoteTransactionResponse_TransactionState {
if m != nil {
return m.State
}
return VoteTransactionResponse_COMMIT
}
func init() {
proto.RegisterEnum("gitaly.VoteTransactionResponse_TransactionState", VoteTransactionResponse_TransactionState_name, VoteTransactionResponse_TransactionState_value)
proto.RegisterType((*VoteTransactionRequest)(nil), "gitaly.VoteTransactionRequest")
proto.RegisterType((*VoteTransactionResponse)(nil), "gitaly.VoteTransactionResponse")
}
func init() { proto.RegisterFile("transaction.proto", fileDescriptor_2cc4e03d2c28c490) }
var fileDescriptor_2cc4e03d2c28c490 = []byte{
// 339 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x51, 0xcd, 0x4e, 0xf2, 0x40,
0x14, 0xfd, 0x86, 0xaf, 0x34, 0x72, 0x45, 0xc4, 0x89, 0xc1, 0x86, 0x85, 0x36, 0x4d, 0x4c, 0x6a,
0xa2, 0x2d, 0x41, 0x17, 0x6e, 0xc5, 0xc4, 0xc8, 0x82, 0x90, 0x8c, 0xe8, 0x82, 0x0d, 0x19, 0xe8,
0x85, 0x36, 0xa9, 0x9d, 0x3a, 0x33, 0x2c, 0x78, 0x07, 0xf7, 0xfa, 0x3e, 0x26, 0x3e, 0x94, 0x2b,
0x43, 0xab, 0xd8, 0x60, 0x88, 0xbb, 0x7b, 0xcf, 0xcf, 0xcc, 0x39, 0x33, 0xb0, 0xa7, 0x25, 0x4f,
0x14, 0x9f, 0xe8, 0x48, 0x24, 0x5e, 0x2a, 0x85, 0x16, 0xd4, 0x9c, 0x45, 0x9a, 0xc7, 0x8b, 0x26,
0xc4, 0x51, 0xa2, 0x73, 0xac, 0x59, 0x55, 0x21, 0x97, 0x18, 0xe4, 0x9b, 0xf3, 0x46, 0xa0, 0xf1,
0x20, 0x34, 0x0e, 0x7e, 0xbc, 0x0c, 0x9f, 0xe6, 0xa8, 0x34, 0xbd, 0x04, 0x90, 0x98, 0x0a, 0x15,
0x69, 0x21, 0x17, 0x16, 0xb1, 0x89, 0xbb, 0xdd, 0xa6, 0x5e, 0x7e, 0xa2, 0x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0x9d, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x43, 0x1d, 0x41, 0x32,
0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// 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.SupportPackageIsVersion4
// RefTransactionClient is the client API for RefTransaction service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RefTransactionClient interface {
VoteTransaction(ctx context.Context, in *VoteTransactionRequest, opts ...grpc.CallOption) (*VoteTransactionResponse, error)
}
type refTransactionClient struct {
cc *grpc.ClientConn
}
func NewRefTransactionClient(cc *grpc.ClientConn) RefTransactionClient {
return &refTransactionClient{cc}
}
func (c *refTransactionClient) VoteTransaction(ctx context.Context, in *VoteTransactionRequest, opts ...grpc.CallOption) (*VoteTransactionResponse, error) {
out := new(VoteTransactionResponse)
err := c.cc.Invoke(ctx, "/gitaly.RefTransaction/VoteTransaction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RefTransactionServer is the server API for RefTransaction service.
type RefTransactionServer interface {
VoteTransaction(context.Context, *VoteTransactionRequest) (*VoteTransactionResponse, error)
}
// UnimplementedRefTransactionServer can be embedded to have forward compatible implementations.
type UnimplementedRefTransactionServer struct {
}
func (*UnimplementedRefTransactionServer) VoteTransaction(ctx context.Context, req *VoteTransactionRequest) (*VoteTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VoteTransaction not implemented")
}
func RegisterRefTransactionServer(s *grpc.Server, srv RefTransactionServer) {
s.RegisterService(&_RefTransaction_serviceDesc, srv)
}
func _RefTransaction_VoteTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VoteTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RefTransactionServer).VoteTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.RefTransaction/VoteTransaction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RefTransactionServer).VoteTransaction(ctx, req.(*VoteTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
var _RefTransaction_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.RefTransaction",
HandlerType: (*RefTransactionServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "VoteTransaction",
Handler: _RefTransaction_VoteTransaction_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "transaction.proto",
}
|