gitlab-global-service-client-poc 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1574f79e92810759bb02dec1258489d3a1c27df653d8d1ebf42389a20943b94b
4
- data.tar.gz: b0803cc16b990ef28dedda17b408e948fa8d7867afeaac977c76208620da53fa
3
+ metadata.gz: 17fc81c35dfdbe5a033ed1b764abeb3ff64baa5c3975bc2968c9bf3be1c0a467
4
+ data.tar.gz: 40d24ec1506d7c299f5be4b449a1db23b97f7ce09b6bfcf770e7a72d52649361
5
5
  SHA512:
6
- metadata.gz: c97c61eff07b03b64eb66b15b4f1b8bf3b8f3bd72db54605cd44d39881088eff3ec2fa988a9cbfc4e4322905443b24933c682a33f14a2a5cf46bc500b99bc00b
7
- data.tar.gz: 86191eb631671b703a9e14432739c4f76d19e6463b757570dfe1b7593ca05fe4b7a0c6dff181fd8863b4f97ebc1dd0f245a7d2ecb975e031ef8c4667606ffb8c
6
+ metadata.gz: cc251f14e12599fddcaa79b860fd956d252cc8d7c0bbf911ac5f6c65431c8bdd0b91cff6883f6988b13ed1b72c9b9ca218dec2c09df9f076e7da8c9ed849f69e
7
+ data.tar.gz: 04cf847eb46a9430496ca7ea4e542113b5277f0c2f6309504e67a967c43465afe818533547df372a7352ad523dceb5c6d6bf8210e7f68f5a7ef715683f650fa9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-global-service-poc (0.0.1)
4
+ gitlab-global-service-client-poc (0.0.5)
5
5
  grpc
6
6
 
7
7
  GEM
@@ -59,7 +59,7 @@ PLATFORMS
59
59
  aarch64-linux
60
60
 
61
61
  DEPENDENCIES
62
- gitlab-global-service-poc!
62
+ gitlab-global-service-client-poc!
63
63
  rake (~> 13.0)
64
64
  rspec (~> 3.0)
65
65
  rubocop (~> 1.21)
data/lib/gitlab/cells.rb CHANGED
@@ -1,2 +1,14 @@
1
1
  require 'proto/gs_pb'
2
2
  require 'proto/gs_services_pb'
3
+
4
+ module Gitlab
5
+ module Cells
6
+ def self.build_metadata(cell_name:)
7
+ {
8
+ metadata: {
9
+ "cell_name": cell_name
10
+ }
11
+ }
12
+ end
13
+ end
14
+ end
data/lib/proto/gs_pb.rb CHANGED
@@ -10,11 +10,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  optional :table_name, :string, 1
11
11
  optional :block_size, :int64, 2
12
12
  end
13
- add_message "gitlab.cells.SequenceResponse" do
14
- optional :sequence_claim_id, :int64, 1
13
+ add_message "gitlab.cells.SequenceBlockInfo" do
14
+ optional :request_id, :int64, 1
15
15
  optional :table_name, :string, 2
16
- optional :start_id, :int64, 3
17
- optional :end_id, :int64, 4
16
+ optional :sequence_start_id, :int64, 3
17
+ optional :sequence_end_id, :int64, 4
18
+ end
19
+ add_message "gitlab.cells.SequenceResponse" do
20
+ optional :info, :message, 1, "gitlab.cells.SequenceBlockInfo"
18
21
  end
19
22
  add_message "gitlab.cells.ClaimRequest" do
20
23
  optional :claim_type, :enum, 1, "gitlab.cells.ClaimType"
@@ -67,6 +70,7 @@ end
67
70
  module Gitlab
68
71
  module Cells
69
72
  SequenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitlab.cells.SequenceRequest").msgclass
73
+ SequenceBlockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitlab.cells.SequenceBlockInfo").msgclass
70
74
  SequenceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitlab.cells.SequenceResponse").msgclass
71
75
  ClaimRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitlab.cells.ClaimRequest").msgclass
72
76
  ClaimInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitlab.cells.ClaimInfo").msgclass
@@ -6,21 +6,52 @@ require 'proto/gs_pb'
6
6
 
7
7
  module Gitlab
8
8
  module Cells
9
- module GlobalService
9
+ module SequenceService
10
+ # Restricted read-write service to provide cluster-wide primary key uniqueness
10
11
  class Service
11
12
 
12
13
  include GRPC::GenericService
13
14
 
14
15
  self.marshal_class_method = :encode
15
16
  self.unmarshal_class_method = :decode
16
- self.service_name = 'gitlab.cells.GlobalService'
17
+ self.service_name = 'gitlab.cells.SequenceService'
17
18
 
18
19
  rpc :GetCells, Gitlab::Cells::CellsRequest, Gitlab::Cells::CellsResponse
19
20
  rpc :RequestSequence, Gitlab::Cells::SequenceRequest, Gitlab::Cells::SequenceResponse
20
21
  rpc :ValidateSequence, Gitlab::Cells::SequenceResponse, Gitlab::Cells::SequenceResponse
22
+ end
23
+
24
+ Stub = Service.rpc_stub_class
25
+ end
26
+ module ClaimService
27
+ # Restricted read-write service to claim global uniqueness on resources
28
+ class Service
29
+
30
+ include GRPC::GenericService
31
+
32
+ self.marshal_class_method = :encode
33
+ self.unmarshal_class_method = :decode
34
+ self.service_name = 'gitlab.cells.ClaimService'
35
+
36
+ rpc :GetCells, Gitlab::Cells::CellsRequest, Gitlab::Cells::CellsResponse
21
37
  rpc :RequestClaim, Gitlab::Cells::ClaimRequest, Gitlab::Cells::ClaimResponse
22
38
  rpc :GetClaims, Gitlab::Cells::ClaimRequest, Gitlab::Cells::ClaimsResponse
23
39
  rpc :DeleteClaim, Gitlab::Cells::ClaimRequest, Gitlab::Cells::ClaimsResponse
40
+ end
41
+
42
+ Stub = Service.rpc_stub_class
43
+ end
44
+ module ClassifyService
45
+ # Public read-only service used by various Routing Services
46
+ class Service
47
+
48
+ include GRPC::GenericService
49
+
50
+ self.marshal_class_method = :encode
51
+ self.unmarshal_class_method = :decode
52
+ self.service_name = 'gitlab.cells.ClassifyService'
53
+
54
+ rpc :GetCells, Gitlab::Cells::CellsRequest, Gitlab::Cells::CellsResponse
24
55
  rpc :Classify, Gitlab::Cells::ClassifyRequest, Gitlab::Cells::ClassifyResponse
25
56
  end
26
57
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-global-service-client-poc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Trzciński
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-22 00:00:00.000000000 Z
11
+ date: 2024-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc