Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/go/gitalypb/transaction.pb.go169
-rw-r--r--proto/transaction.proto16
2 files changed, 162 insertions, 23 deletions
diff --git a/proto/go/gitalypb/transaction.pb.go b/proto/go/gitalypb/transaction.pb.go
index 4048f2eba..6f70b1cfa 100644
--- a/proto/go/gitalypb/transaction.pb.go
+++ b/proto/go/gitalypb/transaction.pb.go
@@ -31,16 +31,19 @@ type VoteTransactionResponse_TransactionState int32
const (
VoteTransactionResponse_COMMIT VoteTransactionResponse_TransactionState = 0
VoteTransactionResponse_ABORT VoteTransactionResponse_TransactionState = 1
+ VoteTransactionResponse_STOP VoteTransactionResponse_TransactionState = 2
)
var VoteTransactionResponse_TransactionState_name = map[int32]string{
0: "COMMIT",
1: "ABORT",
+ 2: "STOP",
}
var VoteTransactionResponse_TransactionState_value = map[string]int32{
"COMMIT": 0,
"ABORT": 1,
+ "STOP": 2,
}
func (x VoteTransactionResponse_TransactionState) String() string {
@@ -156,38 +159,122 @@ func (m *VoteTransactionResponse) GetState() VoteTransactionResponse_Transaction
return VoteTransactionResponse_COMMIT
}
+type StopTransactionRequest 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"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *StopTransactionRequest) Reset() { *m = StopTransactionRequest{} }
+func (m *StopTransactionRequest) String() string { return proto.CompactTextString(m) }
+func (*StopTransactionRequest) ProtoMessage() {}
+func (*StopTransactionRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_2cc4e03d2c28c490, []int{2}
+}
+
+func (m *StopTransactionRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_StopTransactionRequest.Unmarshal(m, b)
+}
+func (m *StopTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_StopTransactionRequest.Marshal(b, m, deterministic)
+}
+func (m *StopTransactionRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StopTransactionRequest.Merge(m, src)
+}
+func (m *StopTransactionRequest) XXX_Size() int {
+ return xxx_messageInfo_StopTransactionRequest.Size(m)
+}
+func (m *StopTransactionRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StopTransactionRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StopTransactionRequest proto.InternalMessageInfo
+
+func (m *StopTransactionRequest) GetRepository() *Repository {
+ if m != nil {
+ return m.Repository
+ }
+ return nil
+}
+
+func (m *StopTransactionRequest) GetTransactionId() uint64 {
+ if m != nil {
+ return m.TransactionId
+ }
+ return 0
+}
+
+type StopTransactionResponse struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *StopTransactionResponse) Reset() { *m = StopTransactionResponse{} }
+func (m *StopTransactionResponse) String() string { return proto.CompactTextString(m) }
+func (*StopTransactionResponse) ProtoMessage() {}
+func (*StopTransactionResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_2cc4e03d2c28c490, []int{3}
+}
+
+func (m *StopTransactionResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_StopTransactionResponse.Unmarshal(m, b)
+}
+func (m *StopTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_StopTransactionResponse.Marshal(b, m, deterministic)
+}
+func (m *StopTransactionResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StopTransactionResponse.Merge(m, src)
+}
+func (m *StopTransactionResponse) XXX_Size() int {
+ return xxx_messageInfo_StopTransactionResponse.Size(m)
+}
+func (m *StopTransactionResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StopTransactionResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StopTransactionResponse proto.InternalMessageInfo
+
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")
+ proto.RegisterType((*StopTransactionRequest)(nil), "gitaly.StopTransactionRequest")
+ proto.RegisterType((*StopTransactionResponse)(nil), "gitaly.StopTransactionResponse")
}
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, 0x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0x9f, 0xa1, 0x79, 0xf4, 0x69, 0x1d, 0xb1, 0x73, 0x8f, 0xa0, 0x4e, 0xd8, 0xbc, 0x40, 0xe1,
+ 0x31, 0x7c, 0x38, 0x28, 0x04, 0x7f, 0x39, 0xd9, 0x54, 0x9e, 0xa0, 0xf5, 0xf5, 0x85, 0x26, 0x5d,
+ 0xf3, 0xe1, 0xda, 0x2b, 0x55, 0xd0, 0xc6, 0xfb, 0xe0, 0x92, 0xbd, 0xf7, 0xf3, 0xed, 0xec, 0xbd,
+ 0x4f, 0x44, 0xd8, 0x7a, 0xf7, 0xda, 0xe3, 0xcd, 0xe6, 0x92, 0x4e, 0xfd, 0x19, 0xbf, 0x08, 0xf4,
+ 0xf3, 0x07, 0x17, 0x8b, 0x40, 0xeb, 0x83, 0xfc, 0x2f, 0x0f, 0x16, 0xfc, 0x69, 0xce, 0xa6, 0x53,
+ 0x33, 0x87, 0xba, 0x8f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x19, 0xe6, 0x7d, 0x2f, 0x03, 0x00,
+ 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -203,6 +290,7 @@ const _ = grpc.SupportPackageIsVersion4
// 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)
+ StopTransaction(ctx context.Context, in *StopTransactionRequest, opts ...grpc.CallOption) (*StopTransactionResponse, error)
}
type refTransactionClient struct {
@@ -222,9 +310,19 @@ func (c *refTransactionClient) VoteTransaction(ctx context.Context, in *VoteTran
return out, nil
}
+func (c *refTransactionClient) StopTransaction(ctx context.Context, in *StopTransactionRequest, opts ...grpc.CallOption) (*StopTransactionResponse, error) {
+ out := new(StopTransactionResponse)
+ err := c.cc.Invoke(ctx, "/gitaly.RefTransaction/StopTransaction", 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)
+ StopTransaction(context.Context, *StopTransactionRequest) (*StopTransactionResponse, error)
}
// UnimplementedRefTransactionServer can be embedded to have forward compatible implementations.
@@ -234,6 +332,9 @@ type UnimplementedRefTransactionServer struct {
func (*UnimplementedRefTransactionServer) VoteTransaction(ctx context.Context, req *VoteTransactionRequest) (*VoteTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VoteTransaction not implemented")
}
+func (*UnimplementedRefTransactionServer) StopTransaction(ctx context.Context, req *StopTransactionRequest) (*StopTransactionResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method StopTransaction not implemented")
+}
func RegisterRefTransactionServer(s *grpc.Server, srv RefTransactionServer) {
s.RegisterService(&_RefTransaction_serviceDesc, srv)
@@ -257,6 +358,24 @@ func _RefTransaction_VoteTransaction_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler)
}
+func _RefTransaction_StopTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(StopTransactionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RefTransactionServer).StopTransaction(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/gitaly.RefTransaction/StopTransaction",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RefTransactionServer).StopTransaction(ctx, req.(*StopTransactionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _RefTransaction_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.RefTransaction",
HandlerType: (*RefTransactionServer)(nil),
@@ -265,6 +384,10 @@ var _RefTransaction_serviceDesc = grpc.ServiceDesc{
MethodName: "VoteTransaction",
Handler: _RefTransaction_VoteTransaction_Handler,
},
+ {
+ MethodName: "StopTransaction",
+ Handler: _RefTransaction_StopTransaction_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "transaction.proto",
diff --git a/proto/transaction.proto b/proto/transaction.proto
index 1e7f1f5d7..fb11879c4 100644
--- a/proto/transaction.proto
+++ b/proto/transaction.proto
@@ -16,6 +16,13 @@ service RefTransaction {
};
}
+ rpc StopTransaction (StopTransactionRequest) returns (StopTransactionResponse) {
+ option (op_type) = {
+ op: MUTATOR
+ scope_level: REPOSITORY
+ };
+ }
+
}
message VoteTransactionRequest {
@@ -34,7 +41,16 @@ message VoteTransactionResponse {
enum TransactionState {
COMMIT = 0;
ABORT = 1;
+ STOP = 2;
}
TransactionState state = 1;
}
+
+message StopTransactionRequest {
+ Repository repository = 1[(target_repository)=true];
+ // ID of the transaction we're processing
+ uint64 transaction_id = 2;
+}
+
+message StopTransactionResponse {}