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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe15d88dd3b7355c0aca606230066bc38c1f0485ac9037e8b3bc39d3284937e3
4
- data.tar.gz: 0c045b0bd7e69cf48e2708a70c08597f78402f1f03c4eef2e638745520ec7d60
3
+ metadata.gz: 17fc81c35dfdbe5a033ed1b764abeb3ff64baa5c3975bc2968c9bf3be1c0a467
4
+ data.tar.gz: 40d24ec1506d7c299f5be4b449a1db23b97f7ce09b6bfcf770e7a72d52649361
5
5
  SHA512:
6
- metadata.gz: 8a401ce7b0d5558201eeca7860bdbcd6c4db177393a70bcfa852e1f04f031fbbe04d347e8e834626288329fa4d2695eef484fceec8c267b169b95ac83fe1a12a
7
- data.tar.gz: 924665966feb5a4e7d8999a739cf9c59df8536596c70b21d8dc30bed247d47310b4c0845edc3110a3986515601fdd62c738120f05670f989e4b9f1c52bfbd0ac
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"
@@ -29,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
32
  optional :resource_type, :string, 4
30
33
  optional :resource_id, :int64, 5
31
34
  optional :cell_id, :int64, 6
35
+ proto3_optional :cell_info, :message, 7, "gitlab.cells.CellInfo"
32
36
  end
33
37
  add_message "gitlab.cells.ClaimResponse" do
34
38
  optional :claim, :message, 1, "gitlab.cells.ClaimInfo"
@@ -52,7 +56,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
52
56
  end
53
57
  add_message "gitlab.cells.ClassifyResponse" do
54
58
  optional :claim_info, :message, 1, "gitlab.cells.ClaimInfo"
55
- proto3_optional :cell_info, :message, 2, "gitlab.cells.CellInfo"
56
59
  end
57
60
  add_enum "gitlab.cells.ClaimType" do
58
61
  value :Unknown, 0
@@ -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.4
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