lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/update.rb
# Creates persistent subscription in a given group
# @param [String] name of the subscription stream to update
# @param [String] name of the subscription group
# @param [Hash] options - additional settings to be set on subscription.
#   Refer to EventStoreClient::GRPC::Commands::SettingsSchema
#   for detailed attributes schema
# @return [Dry::Monads::Result::Success, Dry::Monads::Result::Failure]
#
Creates persistent subscription in a given group
Creates persistent subscription in a given group
def call(stream, group, options: {})
            schema = SettingsSchema.call(options)
            return Failure(schema.errors) if schema.failure?
            opts =
              {
                stream_identifier: {
                  streamName: stream
                },
                group_name: group,
                settings: schema.to_h
              }
            service.update(request.new(options: opts), metadata: metadata)
            Success()
          rescue ::GRPC::Unknown => e
            return Failure(:not_found) if e.message.include?('DoesNotExist')
            raise e
          end
def call ( stream , group , options : { } ) schema = SettingsSchema . call ( options ) return Failure ( schema . errors ) if schema . failure? opts = { stream_identifier : { streamName : stream } , group_name : group , settings : schema . to_h } service . update ( request . new ( options : opts ) , metadata : metadata ) Success ( ) rescue :: GRPC :: Unknown => e return Failure ( :not_found ) if e . message . include? ( 'DoesNotExist' ) raise e end
Creates persistent subscription in a given group
Creates persistent subscription in a given group
None
Dry::Monads::Result::Success, Dry::Monads::Result::Failure
stream
group
options
additional settings to be set on subscription. Refer to EventStoreClient::GRPC::Commands::SettingsSchema for detailed attributes schema
additional settings to be set on subscription . Refer to EventStoreClient :: GRPC :: Commands :: SettingsSchema for detailed attributes schema