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

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: 1574f79e92810759bb02dec1258489d3a1c27df653d8d1ebf42389a20943b94b
4
- data.tar.gz: b0803cc16b990ef28dedda17b408e948fa8d7867afeaac977c76208620da53fa
3
+ metadata.gz: e8d61df3c78e7abb78a17b777d3fcd34299a5e61841c720b2687d6f05eea9498
4
+ data.tar.gz: ea8b4e476d8d2ecaaf602d3e3ac1836626b8d412b92793f8c816e0839415ba9c
5
5
  SHA512:
6
- metadata.gz: c97c61eff07b03b64eb66b15b4f1b8bf3b8f3bd72db54605cd44d39881088eff3ec2fa988a9cbfc4e4322905443b24933c682a33f14a2a5cf46bc500b99bc00b
7
- data.tar.gz: 86191eb631671b703a9e14432739c4f76d19e6463b757570dfe1b7593ca05fe4b7a0c6dff181fd8863b4f97ebc1dd0f245a7d2ecb975e031ef8c4667606ffb8c
6
+ metadata.gz: a156c2faf6bbe44a4d701b23933750651c6648254f41c7f5a50fb88f9bac459a16e209ca240f887465bd12ccc4ce07ca927b9a445f48447e030f0cadbe85d0d7
7
+ data.tar.gz: 142b906c6629c6deedf00c37fbed2c03a2921969bf5bd3387e808d2d7efafa4417d8fb549e399a382ebf3bd50db59cb7c30c9f4df41db720116d98d0b9e28417
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 :block_start, :int64, 3
17
+ optional :block_size, :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.7
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