event_store_client 0.2.8 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -37
  3. data/lib/event_store_client.rb +0 -2
  4. data/lib/event_store_client/adapters/grpc.rb +21 -0
  5. data/lib/event_store_client/adapters/grpc/Protos/cluster.proto +149 -0
  6. data/lib/event_store_client/adapters/grpc/Protos/gossip.proto +44 -0
  7. data/lib/event_store_client/adapters/grpc/Protos/operations.proto +45 -0
  8. data/lib/event_store_client/adapters/grpc/Protos/persistent.proto +180 -0
  9. data/lib/event_store_client/adapters/grpc/Protos/projections.proto +174 -0
  10. data/lib/event_store_client/adapters/grpc/Protos/shared.proto +22 -0
  11. data/lib/event_store_client/adapters/grpc/Protos/streams.proto +242 -0
  12. data/lib/event_store_client/adapters/grpc/Protos/users.proto +119 -0
  13. data/lib/event_store_client/adapters/grpc/client.rb +119 -0
  14. data/lib/event_store_client/adapters/grpc/command_registrar.rb +32 -0
  15. data/lib/event_store_client/adapters/grpc/commands/command.rb +43 -0
  16. data/lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/create.rb +46 -0
  17. data/lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/delete.rb +34 -0
  18. data/lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/read.rb +65 -0
  19. data/lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/settings_schema.rb +38 -0
  20. data/lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/update.rb +48 -0
  21. data/lib/event_store_client/adapters/grpc/commands/projections/create.rb +45 -0
  22. data/lib/event_store_client/adapters/grpc/commands/projections/delete.rb +34 -0
  23. data/lib/event_store_client/adapters/grpc/commands/projections/update.rb +42 -0
  24. data/lib/event_store_client/adapters/grpc/commands/streams/append.rb +61 -0
  25. data/lib/event_store_client/adapters/grpc/commands/streams/delete.rb +35 -0
  26. data/lib/event_store_client/adapters/grpc/commands/streams/link_to.rb +61 -0
  27. data/lib/event_store_client/adapters/grpc/commands/streams/read.rb +80 -0
  28. data/lib/event_store_client/adapters/grpc/commands/streams/read_all.rb +43 -0
  29. data/lib/event_store_client/adapters/grpc/commands/streams/tombstone.rb +35 -0
  30. data/lib/event_store_client/adapters/grpc/connection.rb +50 -0
  31. data/lib/event_store_client/adapters/grpc/generated/cluster_pb.rb +140 -0
  32. data/lib/event_store_client/adapters/grpc/generated/cluster_services_pb.rb +46 -0
  33. data/lib/event_store_client/adapters/grpc/generated/gossip_pb.rb +53 -0
  34. data/lib/event_store_client/adapters/grpc/generated/gossip_services_pb.rb +26 -0
  35. data/lib/event_store_client/adapters/grpc/generated/operations_pb.rb +49 -0
  36. data/lib/event_store_client/adapters/grpc/generated/operations_services_pb.rb +31 -0
  37. data/lib/event_store_client/adapters/grpc/generated/persistent_pb.rb +213 -0
  38. data/lib/event_store_client/adapters/grpc/generated/persistent_services_pb.rb +29 -0
  39. data/lib/event_store_client/adapters/grpc/generated/projections_pb.rb +193 -0
  40. data/lib/event_store_client/adapters/grpc/generated/projections_services_pb.rb +34 -0
  41. data/lib/event_store_client/adapters/grpc/generated/shared_pb.rb +35 -0
  42. data/lib/event_store_client/adapters/grpc/generated/streams_pb.rb +283 -0
  43. data/lib/event_store_client/adapters/grpc/generated/streams_services_pb.rb +29 -0
  44. data/lib/event_store_client/adapters/grpc/generated/users_pb.rb +126 -0
  45. data/lib/event_store_client/adapters/grpc/generated/users_services_pb.rb +33 -0
  46. data/lib/event_store_client/adapters/http.rb +16 -0
  47. data/lib/event_store_client/adapters/http/README.md +16 -0
  48. data/lib/event_store_client/adapters/http/client.rb +160 -0
  49. data/lib/event_store_client/adapters/http/commands/command.rb +27 -0
  50. data/lib/event_store_client/adapters/http/commands/persistent_subscriptions/ack.rb +15 -0
  51. data/lib/event_store_client/adapters/http/commands/persistent_subscriptions/create.rb +31 -0
  52. data/lib/event_store_client/adapters/http/commands/persistent_subscriptions/read.rb +57 -0
  53. data/lib/event_store_client/adapters/http/commands/projections/create.rb +30 -0
  54. data/lib/event_store_client/adapters/http/commands/streams/append.rb +49 -0
  55. data/lib/event_store_client/adapters/http/commands/streams/delete.rb +16 -0
  56. data/lib/event_store_client/adapters/http/commands/streams/link_to.rb +49 -0
  57. data/lib/event_store_client/adapters/http/commands/streams/read.rb +53 -0
  58. data/lib/event_store_client/adapters/http/commands/streams/tombstone.rb +17 -0
  59. data/lib/event_store_client/adapters/http/connection.rb +46 -0
  60. data/lib/event_store_client/adapters/http/request_method.rb +28 -0
  61. data/lib/event_store_client/adapters/in_memory.rb +142 -0
  62. data/lib/event_store_client/broker.rb +16 -5
  63. data/lib/event_store_client/client.rb +18 -72
  64. data/lib/event_store_client/configuration.rb +28 -14
  65. data/lib/event_store_client/data_decryptor.rb +13 -8
  66. data/lib/event_store_client/data_encryptor.rb +7 -6
  67. data/lib/event_store_client/deserialized_event.rb +10 -1
  68. data/lib/event_store_client/event.rb +2 -2
  69. data/lib/event_store_client/mapper/default.rb +0 -1
  70. data/lib/event_store_client/serializer/json.rb +2 -0
  71. data/lib/event_store_client/subscriptions.rb +4 -13
  72. data/lib/event_store_client/types.rb +3 -1
  73. data/lib/event_store_client/value_objects/read_direction.rb +43 -0
  74. data/lib/event_store_client/version.rb +1 -1
  75. metadata +97 -15
  76. data/lib/event_store_client/store_adapter.rb +0 -10
  77. data/lib/event_store_client/store_adapter/api/client.rb +0 -224
  78. data/lib/event_store_client/store_adapter/api/connection.rb +0 -43
  79. data/lib/event_store_client/store_adapter/api/request_method.rb +0 -30
  80. data/lib/event_store_client/store_adapter/in_memory.rb +0 -160
@@ -0,0 +1,140 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: cluster.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'shared_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("cluster.proto", :syntax => :proto3) do
9
+ add_message "event_store.cluster.GossipRequest" do
10
+ optional :info, :message, 1, "event_store.cluster.ClusterInfo"
11
+ optional :server, :message, 2, "event_store.cluster.EndPoint"
12
+ end
13
+ add_message "event_store.cluster.ViewChangeRequest" do
14
+ optional :server_id, :message, 1, "event_store.client.shared.UUID"
15
+ optional :server_http, :message, 2, "event_store.cluster.EndPoint"
16
+ optional :attempted_view, :int32, 3
17
+ end
18
+ add_message "event_store.cluster.ViewChangeProofRequest" do
19
+ optional :server_id, :message, 1, "event_store.client.shared.UUID"
20
+ optional :server_http, :message, 2, "event_store.cluster.EndPoint"
21
+ optional :installed_view, :int32, 3
22
+ end
23
+ add_message "event_store.cluster.PrepareRequest" do
24
+ optional :server_id, :message, 1, "event_store.client.shared.UUID"
25
+ optional :server_http, :message, 2, "event_store.cluster.EndPoint"
26
+ optional :view, :int32, 3
27
+ end
28
+ add_message "event_store.cluster.PrepareOkRequest" do
29
+ optional :view, :int32, 1
30
+ optional :server_id, :message, 2, "event_store.client.shared.UUID"
31
+ optional :server_http, :message, 3, "event_store.cluster.EndPoint"
32
+ optional :epoch_number, :int32, 4
33
+ optional :epoch_position, :int64, 5
34
+ optional :epoch_id, :message, 6, "event_store.client.shared.UUID"
35
+ optional :epoch_leader_instance_id, :message, 7, "event_store.client.shared.UUID"
36
+ optional :last_commit_position, :int64, 8
37
+ optional :writer_checkpoint, :int64, 9
38
+ optional :chaser_checkpoint, :int64, 10
39
+ optional :node_priority, :int32, 11
40
+ optional :cluster_info, :message, 12, "event_store.cluster.ClusterInfo"
41
+ end
42
+ add_message "event_store.cluster.ProposalRequest" do
43
+ optional :server_id, :message, 1, "event_store.client.shared.UUID"
44
+ optional :server_http, :message, 2, "event_store.cluster.EndPoint"
45
+ optional :leader_id, :message, 3, "event_store.client.shared.UUID"
46
+ optional :leader_http, :message, 4, "event_store.cluster.EndPoint"
47
+ optional :view, :int32, 5
48
+ optional :epoch_number, :int32, 6
49
+ optional :epoch_position, :int64, 7
50
+ optional :epoch_id, :message, 8, "event_store.client.shared.UUID"
51
+ optional :epoch_leader_instance_id, :message, 9, "event_store.client.shared.UUID"
52
+ optional :last_commit_position, :int64, 10
53
+ optional :writer_checkpoint, :int64, 11
54
+ optional :chaser_checkpoint, :int64, 12
55
+ optional :node_priority, :int32, 13
56
+ end
57
+ add_message "event_store.cluster.AcceptRequest" do
58
+ optional :server_id, :message, 1, "event_store.client.shared.UUID"
59
+ optional :server_http, :message, 2, "event_store.cluster.EndPoint"
60
+ optional :leader_id, :message, 3, "event_store.client.shared.UUID"
61
+ optional :leader_http, :message, 4, "event_store.cluster.EndPoint"
62
+ optional :view, :int32, 5
63
+ end
64
+ add_message "event_store.cluster.LeaderIsResigningRequest" do
65
+ optional :leader_id, :message, 1, "event_store.client.shared.UUID"
66
+ optional :leader_http, :message, 2, "event_store.cluster.EndPoint"
67
+ end
68
+ add_message "event_store.cluster.LeaderIsResigningOkRequest" do
69
+ optional :leader_id, :message, 1, "event_store.client.shared.UUID"
70
+ optional :leader_http, :message, 2, "event_store.cluster.EndPoint"
71
+ optional :server_id, :message, 3, "event_store.client.shared.UUID"
72
+ optional :server_http, :message, 4, "event_store.cluster.EndPoint"
73
+ end
74
+ add_message "event_store.cluster.ClusterInfo" do
75
+ repeated :members, :message, 1, "event_store.cluster.MemberInfo"
76
+ end
77
+ add_message "event_store.cluster.EndPoint" do
78
+ optional :address, :string, 1
79
+ optional :port, :uint32, 2
80
+ end
81
+ add_message "event_store.cluster.MemberInfo" do
82
+ optional :instance_id, :message, 1, "event_store.client.shared.UUID"
83
+ optional :time_stamp, :int64, 2
84
+ optional :state, :enum, 3, "event_store.cluster.MemberInfo.VNodeState"
85
+ optional :is_alive, :bool, 4
86
+ optional :http_end_point, :message, 5, "event_store.cluster.EndPoint"
87
+ optional :internal_tcp, :message, 6, "event_store.cluster.EndPoint"
88
+ optional :external_tcp, :message, 7, "event_store.cluster.EndPoint"
89
+ optional :internal_tcp_uses_tls, :bool, 8
90
+ optional :external_tcp_uses_tls, :bool, 9
91
+ optional :last_commit_position, :int64, 10
92
+ optional :writer_checkpoint, :int64, 11
93
+ optional :chaser_checkpoint, :int64, 12
94
+ optional :epoch_position, :int64, 13
95
+ optional :epoch_number, :int32, 14
96
+ optional :epoch_id, :message, 15, "event_store.client.shared.UUID"
97
+ optional :node_priority, :int32, 16
98
+ optional :is_read_only_replica, :bool, 17
99
+ optional :advertise_host_to_client_as, :string, 18
100
+ optional :advertise_http_port_to_client_as, :uint32, 19
101
+ optional :advertise_tcp_port_to_client_as, :uint32, 20
102
+ end
103
+ add_enum "event_store.cluster.MemberInfo.VNodeState" do
104
+ value :Initializing, 0
105
+ value :DiscoverLeader, 1
106
+ value :Unknown, 2
107
+ value :PreReplica, 3
108
+ value :CatchingUp, 4
109
+ value :Clone, 5
110
+ value :Follower, 6
111
+ value :PreLeader, 7
112
+ value :Leader, 8
113
+ value :Manager, 9
114
+ value :ShuttingDown, 10
115
+ value :Shutdown, 11
116
+ value :ReadOnlyLeaderless, 12
117
+ value :PreReadOnlyReplica, 13
118
+ value :ReadOnlyReplica, 14
119
+ value :ResigningLeader, 15
120
+ end
121
+ end
122
+ end
123
+
124
+ module EventStore
125
+ module Cluster
126
+ GossipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.GossipRequest").msgclass
127
+ ViewChangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.ViewChangeRequest").msgclass
128
+ ViewChangeProofRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.ViewChangeProofRequest").msgclass
129
+ PrepareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.PrepareRequest").msgclass
130
+ PrepareOkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.PrepareOkRequest").msgclass
131
+ ProposalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.ProposalRequest").msgclass
132
+ AcceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.AcceptRequest").msgclass
133
+ LeaderIsResigningRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.LeaderIsResigningRequest").msgclass
134
+ LeaderIsResigningOkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.LeaderIsResigningOkRequest").msgclass
135
+ ClusterInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.ClusterInfo").msgclass
136
+ EndPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.EndPoint").msgclass
137
+ MemberInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.MemberInfo").msgclass
138
+ MemberInfo::VNodeState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.cluster.MemberInfo.VNodeState").enummodule
139
+ end
140
+ end
@@ -0,0 +1,46 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: cluster.proto for package 'event_store.cluster'
3
+
4
+ require 'grpc'
5
+ require 'cluster_pb'
6
+
7
+ module EventStore
8
+ module Cluster
9
+ module Gossip
10
+ class Service
11
+
12
+ include GRPC::GenericService
13
+
14
+ self.marshal_class_method = :encode
15
+ self.unmarshal_class_method = :decode
16
+ self.service_name = 'event_store.cluster.Gossip'
17
+
18
+ rpc :Update, ::EventStore::Cluster::GossipRequest, ::EventStore::Cluster::ClusterInfo
19
+ rpc :Read, ::EventStore::Client::Shared::Empty, ::EventStore::Cluster::ClusterInfo
20
+ end
21
+
22
+ Stub = Service.rpc_stub_class
23
+ end
24
+ module Elections
25
+ class Service
26
+
27
+ include GRPC::GenericService
28
+
29
+ self.marshal_class_method = :encode
30
+ self.unmarshal_class_method = :decode
31
+ self.service_name = 'event_store.cluster.Elections'
32
+
33
+ rpc :ViewChange, ::EventStore::Cluster::ViewChangeRequest, ::EventStore::Client::Shared::Empty
34
+ rpc :ViewChangeProof, ::EventStore::Cluster::ViewChangeProofRequest, ::EventStore::Client::Shared::Empty
35
+ rpc :Prepare, ::EventStore::Cluster::PrepareRequest, ::EventStore::Client::Shared::Empty
36
+ rpc :PrepareOk, ::EventStore::Cluster::PrepareOkRequest, ::EventStore::Client::Shared::Empty
37
+ rpc :Proposal, ::EventStore::Cluster::ProposalRequest, ::EventStore::Client::Shared::Empty
38
+ rpc :Accept, ::EventStore::Cluster::AcceptRequest, ::EventStore::Client::Shared::Empty
39
+ rpc :LeaderIsResigning, ::EventStore::Cluster::LeaderIsResigningRequest, ::EventStore::Client::Shared::Empty
40
+ rpc :LeaderIsResigningOk, ::EventStore::Cluster::LeaderIsResigningOkRequest, ::EventStore::Client::Shared::Empty
41
+ end
42
+
43
+ Stub = Service.rpc_stub_class
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,53 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: gossip.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'shared_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("gossip.proto", :syntax => :proto3) do
9
+ add_message "event_store.client.gossip.ClusterInfo" do
10
+ repeated :members, :message, 1, "event_store.client.gossip.MemberInfo"
11
+ end
12
+ add_message "event_store.client.gossip.EndPoint" do
13
+ optional :address, :string, 1
14
+ optional :port, :uint32, 2
15
+ end
16
+ add_message "event_store.client.gossip.MemberInfo" do
17
+ optional :instance_id, :message, 1, "event_store.client.shared.UUID"
18
+ optional :time_stamp, :int64, 2
19
+ optional :state, :enum, 3, "event_store.client.gossip.MemberInfo.VNodeState"
20
+ optional :is_alive, :bool, 4
21
+ optional :http_end_point, :message, 5, "event_store.client.gossip.EndPoint"
22
+ end
23
+ add_enum "event_store.client.gossip.MemberInfo.VNodeState" do
24
+ value :Initializing, 0
25
+ value :DiscoverLeader, 1
26
+ value :Unknown, 2
27
+ value :PreReplica, 3
28
+ value :CatchingUp, 4
29
+ value :Clone, 5
30
+ value :Follower, 6
31
+ value :PreLeader, 7
32
+ value :Leader, 8
33
+ value :Manager, 9
34
+ value :ShuttingDown, 10
35
+ value :Shutdown, 11
36
+ value :ReadOnlyLeaderless, 12
37
+ value :PreReadOnlyReplica, 13
38
+ value :ReadOnlyReplica, 14
39
+ value :ResigningLeader, 15
40
+ end
41
+ end
42
+ end
43
+
44
+ module EventStore
45
+ module Client
46
+ module Gossip
47
+ ClusterInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.gossip.ClusterInfo").msgclass
48
+ EndPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.gossip.EndPoint").msgclass
49
+ MemberInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.gossip.MemberInfo").msgclass
50
+ MemberInfo::VNodeState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.gossip.MemberInfo.VNodeState").enummodule
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,26 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: gossip.proto for package 'event_store.client.gossip'
3
+
4
+ require 'grpc'
5
+ require 'gossip_pb'
6
+
7
+ module EventStore
8
+ module Client
9
+ module Gossip
10
+ module Gossip
11
+ class Service
12
+
13
+ include GRPC::GenericService
14
+
15
+ self.marshal_class_method = :encode
16
+ self.unmarshal_class_method = :decode
17
+ self.service_name = 'event_store.client.gossip.Gossip'
18
+
19
+ rpc :Read, ::EventStore::Client::Shared::Empty, ::EventStore::Client::Gossip::ClusterInfo
20
+ end
21
+
22
+ Stub = Service.rpc_stub_class
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,49 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: operations.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'shared_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("operations.proto", :syntax => :proto3) do
9
+ add_message "event_store.client.operations.StartScavengeReq" do
10
+ optional :options, :message, 1, "event_store.client.operations.StartScavengeReq.Options"
11
+ end
12
+ add_message "event_store.client.operations.StartScavengeReq.Options" do
13
+ optional :thread_count, :int32, 1
14
+ optional :start_from_chunk, :int32, 2
15
+ end
16
+ add_message "event_store.client.operations.StopScavengeReq" do
17
+ optional :options, :message, 1, "event_store.client.operations.StopScavengeReq.Options"
18
+ end
19
+ add_message "event_store.client.operations.StopScavengeReq.Options" do
20
+ optional :scavenge_id, :string, 1
21
+ end
22
+ add_message "event_store.client.operations.ScavengeResp" do
23
+ optional :scavenge_id, :string, 1
24
+ optional :scavenge_result, :enum, 2, "event_store.client.operations.ScavengeResp.ScavengeResult"
25
+ end
26
+ add_enum "event_store.client.operations.ScavengeResp.ScavengeResult" do
27
+ value :Started, 0
28
+ value :InProgress, 1
29
+ value :Stopped, 2
30
+ end
31
+ add_message "event_store.client.operations.SetNodePriorityReq" do
32
+ optional :priority, :int32, 1
33
+ end
34
+ end
35
+ end
36
+
37
+ module EventStore
38
+ module Client
39
+ module Operations
40
+ StartScavengeReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.operations.StartScavengeReq").msgclass
41
+ StartScavengeReq::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.operations.StartScavengeReq.Options").msgclass
42
+ StopScavengeReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.operations.StopScavengeReq").msgclass
43
+ StopScavengeReq::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.operations.StopScavengeReq.Options").msgclass
44
+ ScavengeResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.operations.ScavengeResp").msgclass
45
+ ScavengeResp::ScavengeResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.operations.ScavengeResp.ScavengeResult").enummodule
46
+ SetNodePriorityReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.operations.SetNodePriorityReq").msgclass
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,31 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: operations.proto for package 'event_store.client.operations'
3
+
4
+ require 'grpc'
5
+ require 'operations_pb'
6
+
7
+ module EventStore
8
+ module Client
9
+ module Operations
10
+ module Operations
11
+ class Service
12
+ include GRPC::GenericService
13
+
14
+ self.marshal_class_method = :encode
15
+ self.unmarshal_class_method = :decode
16
+ self.service_name = 'event_store.client.operations.Operations'
17
+
18
+ rpc :StartScavenge, ::EventStore::Client::Operations::StartScavengeReq, ::EventStore::Client::Operations::ScavengeResp
19
+ rpc :StopScavenge, ::EventStore::Client::Operations::StopScavengeReq, ::EventStore::Client::Operations::ScavengeResp
20
+ rpc :Shutdown, ::EventStore::Client::Shared::Empty, ::EventStore::Client::Shared::Empty
21
+ rpc :MergeIndexes, ::EventStore::Client::Shared::Empty, ::EventStore::Client::Shared::Empty
22
+ rpc :ResignNode, ::EventStore::Client::Shared::Empty, ::EventStore::Client::Shared::Empty
23
+ rpc :SetNodePriority, ::EventStore::Client::Operations::SetNodePriorityReq, ::EventStore::Client::Shared::Empty
24
+ rpc :RestartPersistentSubscriptions, ::EventStore::Client::Shared::Empty, ::EventStore::Client::Shared::Empty
25
+ end
26
+
27
+ Stub = Service.rpc_stub_class
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,213 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
4
+ # source: persistent.proto
5
+
6
+ require 'google/protobuf'
7
+ require 'event_store_client/adapters/grpc/generated/shared_pb'
8
+
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("persistent.proto", :syntax => :proto3) do
11
+ # Read persistent Subscription request
12
+ #
13
+ add_message "event_store.client.persistent_subscriptions.ReadReq" do
14
+ oneof :content do
15
+ optional :options, :message, 1, "event_store.client.persistent_subscriptions.ReadReq.Options"
16
+ optional :ack, :message, 2, "event_store.client.persistent_subscriptions.ReadReq.Ack"
17
+ optional :nack, :message, 3, "event_store.client.persistent_subscriptions.ReadReq.Nack"
18
+ end
19
+ end
20
+ add_message "event_store.client.persistent_subscriptions.ReadReq.Options" do
21
+ optional :stream_identifier, :message, 1, "event_store.client.shared.StreamIdentifier"
22
+ optional :group_name, :string, 2
23
+ optional :buffer_size, :int32, 3
24
+ optional :uuid_option, :message, 4, "event_store.client.persistent_subscriptions.ReadReq.Options.UUIDOption"
25
+ end
26
+ add_message "event_store.client.persistent_subscriptions.ReadReq.Options.UUIDOption" do
27
+ oneof :content do
28
+ optional :structured, :message, 1, "event_store.client.shared.Empty"
29
+ optional :string, :message, 2, "event_store.client.shared.Empty"
30
+ end
31
+ end
32
+ add_message "event_store.client.persistent_subscriptions.ReadReq.Ack" do
33
+ optional :id, :bytes, 1
34
+ repeated :ids, :message, 2, "event_store.client.shared.UUID"
35
+ end
36
+ add_message "event_store.client.persistent_subscriptions.ReadReq.Nack" do
37
+ optional :id, :bytes, 1
38
+ repeated :ids, :message, 2, "event_store.client.shared.UUID"
39
+ optional :action, :enum, 3, "event_store.client.persistent_subscriptions.ReadReq.Nack.Action"
40
+ optional :reason, :string, 4
41
+ end
42
+ add_enum "event_store.client.persistent_subscriptions.ReadReq.Nack.Action" do
43
+ value :Unknown, 0
44
+ value :Park, 1
45
+ value :Retry, 2
46
+ value :Skip, 3
47
+ value :Stop, 4
48
+ end
49
+
50
+ # Read persistent Subscription response
51
+ #
52
+ add_message "event_store.client.persistent_subscriptions.ReadResp" do
53
+ oneof :content do
54
+ optional :event, :message, 1, "event_store.client.persistent_subscriptions.ReadResp.ReadEvent"
55
+ optional :subscription_confirmation, :message, 2, "event_store.client.persistent_subscriptions.ReadResp.SubscriptionConfirmation"
56
+ end
57
+ end
58
+ add_message "event_store.client.persistent_subscriptions.ReadResp.ReadEvent" do
59
+ optional :event, :message, 1, "event_store.client.persistent_subscriptions.ReadResp.ReadEvent.RecordedEvent"
60
+ optional :link, :message, 2, "event_store.client.persistent_subscriptions.ReadResp.ReadEvent.RecordedEvent"
61
+ oneof :position do
62
+ optional :commit_position, :uint64, 3
63
+ optional :no_position, :message, 4, "event_store.client.shared.Empty"
64
+ end
65
+ oneof :count do
66
+ optional :retry_count, :int32, 5
67
+ optional :no_retry_count, :message, 6, "event_store.client.shared.Empty"
68
+ end
69
+ end
70
+ add_message "event_store.client.persistent_subscriptions.ReadResp.ReadEvent.RecordedEvent" do
71
+ optional :id, :message, 1, "event_store.client.shared.UUID"
72
+ optional :stream_identifier, :message, 2, "event_store.client.shared.StreamIdentifier"
73
+ optional :stream_revision, :uint64, 3
74
+ optional :prepare_position, :uint64, 4
75
+ optional :commit_position, :uint64, 5
76
+ map :metadata, :string, :string, 6
77
+ optional :custom_metadata, :bytes, 7
78
+ optional :data, :bytes, 8
79
+ end
80
+ add_message "event_store.client.persistent_subscriptions.ReadResp.SubscriptionConfirmation" do
81
+ optional :subscription_id, :string, 1
82
+ end
83
+
84
+ # Create persistent Subscription request
85
+ #
86
+ add_message "event_store.client.persistent_subscriptions.CreateReq" do
87
+ optional :options, :message, 1, "event_store.client.persistent_subscriptions.CreateReq.Options"
88
+ end
89
+ add_message "event_store.client.persistent_subscriptions.CreateReq.Options" do
90
+ optional :stream_identifier, :message, 1, "event_store.client.shared.StreamIdentifier"
91
+ optional :group_name, :string, 2
92
+ optional :settings, :message, 3, "event_store.client.persistent_subscriptions.CreateReq.Settings"
93
+ end
94
+ add_message "event_store.client.persistent_subscriptions.CreateReq.Settings" do
95
+ optional :resolve_links, :bool, 1
96
+ optional :revision, :uint64, 2
97
+ optional :extra_statistics, :bool, 3
98
+ optional :max_retry_count, :int32, 5
99
+ optional :min_checkpoint_count, :int32, 7
100
+ optional :max_checkpoint_count, :int32, 8
101
+ optional :max_subscriber_count, :int32, 9
102
+ optional :live_buffer_size, :int32, 10
103
+ optional :read_batch_size, :int32, 11
104
+ optional :history_buffer_size, :int32, 12
105
+ optional :named_consumer_strategy, :enum, 13, "event_store.client.persistent_subscriptions.CreateReq.ConsumerStrategy"
106
+ oneof :message_timeout do
107
+ optional :message_timeout_ticks, :int64, 4
108
+ optional :message_timeout_ms, :int32, 14
109
+ end
110
+ oneof :checkpoint_after do
111
+ optional :checkpoint_after_ticks, :int64, 6
112
+ optional :checkpoint_after_ms, :int32, 15
113
+ end
114
+ end
115
+ add_enum "event_store.client.persistent_subscriptions.CreateReq.ConsumerStrategy" do
116
+ value :DispatchToSingle, 0
117
+ value :RoundRobin, 1
118
+ value :Pinned, 2
119
+ end
120
+
121
+ # Create persistent subscription response
122
+ #
123
+ add_message "event_store.client.persistent_subscriptions.CreateResp" do
124
+ end
125
+
126
+ # Update persistent subscription request
127
+ #
128
+ add_message "event_store.client.persistent_subscriptions.UpdateReq" do
129
+ optional :options, :message, 1, "event_store.client.persistent_subscriptions.UpdateReq.Options"
130
+ end
131
+ add_message "event_store.client.persistent_subscriptions.UpdateReq.Options" do
132
+ optional :stream_identifier, :message, 1, "event_store.client.shared.StreamIdentifier"
133
+ optional :group_name, :string, 2
134
+ optional :settings, :message, 3, "event_store.client.persistent_subscriptions.UpdateReq.Settings"
135
+ end
136
+ add_message "event_store.client.persistent_subscriptions.UpdateReq.Settings" do
137
+ optional :resolve_links, :bool, 1
138
+ optional :revision, :uint64, 2
139
+ optional :extra_statistics, :bool, 3
140
+ optional :max_retry_count, :int32, 5
141
+ optional :min_checkpoint_count, :int32, 7
142
+ optional :max_checkpoint_count, :int32, 8
143
+ optional :max_subscriber_count, :int32, 9
144
+ optional :live_buffer_size, :int32, 10
145
+ optional :read_batch_size, :int32, 11
146
+ optional :history_buffer_size, :int32, 12
147
+ optional :named_consumer_strategy, :enum, 13, "event_store.client.persistent_subscriptions.UpdateReq.ConsumerStrategy"
148
+ oneof :message_timeout do
149
+ optional :message_timeout_ticks, :int64, 4
150
+ optional :message_timeout_ms, :int32, 14
151
+ end
152
+ oneof :checkpoint_after do
153
+ optional :checkpoint_after_ticks, :int64, 6
154
+ optional :checkpoint_after_ms, :int32, 15
155
+ end
156
+ end
157
+ add_enum "event_store.client.persistent_subscriptions.UpdateReq.ConsumerStrategy" do
158
+ value :DispatchToSingle, 0
159
+ value :RoundRobin, 1
160
+ value :Pinned, 2
161
+ end
162
+
163
+ # Update persistent subscription response
164
+ #
165
+ add_message "event_store.client.persistent_subscriptions.UpdateResp" do
166
+ end
167
+
168
+ # Delete persistent subscription request
169
+ #
170
+ add_message "event_store.client.persistent_subscriptions.DeleteReq" do
171
+ optional :options, :message, 1, "event_store.client.persistent_subscriptions.DeleteReq.Options"
172
+ end
173
+ add_message "event_store.client.persistent_subscriptions.DeleteReq.Options" do
174
+ optional :stream_identifier, :message, 1, "event_store.client.shared.StreamIdentifier"
175
+ optional :group_name, :string, 2
176
+ end
177
+
178
+ # Delete persistent subscription response
179
+ #
180
+ add_message "event_store.client.persistent_subscriptions.DeleteResp" do
181
+ end
182
+ end
183
+ end
184
+
185
+ module EventStore
186
+ module Client
187
+ module PersistentSubscriptions
188
+ ReadReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadReq").msgclass
189
+ ReadReq::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadReq.Options").msgclass
190
+ ReadReq::Options::UUIDOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadReq.Options.UUIDOption").msgclass
191
+ ReadReq::Ack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadReq.Ack").msgclass
192
+ ReadReq::Nack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadReq.Nack").msgclass
193
+ ReadReq::Nack::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadReq.Nack.Action").enummodule
194
+ ReadResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadResp").msgclass
195
+ ReadResp::ReadEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadResp.ReadEvent").msgclass
196
+ ReadResp::ReadEvent::RecordedEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadResp.ReadEvent.RecordedEvent").msgclass
197
+ ReadResp::SubscriptionConfirmation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.ReadResp.SubscriptionConfirmation").msgclass
198
+ CreateReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.CreateReq").msgclass
199
+ CreateReq::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.CreateReq.Options").msgclass
200
+ CreateReq::Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.CreateReq.Settings").msgclass
201
+ CreateReq::ConsumerStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.CreateReq.ConsumerStrategy").enummodule
202
+ CreateResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.CreateResp").msgclass
203
+ UpdateReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.UpdateReq").msgclass
204
+ UpdateReq::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.UpdateReq.Options").msgclass
205
+ UpdateReq::Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.UpdateReq.Settings").msgclass
206
+ UpdateReq::ConsumerStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.UpdateReq.ConsumerStrategy").enummodule
207
+ UpdateResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.UpdateResp").msgclass
208
+ DeleteReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.DeleteReq").msgclass
209
+ DeleteReq::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.DeleteReq.Options").msgclass
210
+ DeleteResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("event_store.client.persistent_subscriptions.DeleteResp").msgclass
211
+ end
212
+ end
213
+ end