Sha256: 76805fbcb467bddb5dc2b742d31ec5bc5d8e2360a4de0cf382f5011765d4ac6b
Contents?: true
Size: 674 Bytes
Versions: 9
Compression:
Stored size: 674 Bytes
Contents
# frozen_string_literal: true module Karafka module Contracts # Contract for validating correctness of the server cli command options. class ServerCliOptions < Base params do optional(:consumer_groups).value(:array, :filled?) end rule(:consumer_groups) do # If there were no consumer_groups declared in the server cli, it means that we will # run all of them and no need to validate them here at all if !value.nil? && !(value - Karafka::App.config.internal.routing_builder.map(&:name)).empty? key(:consumer_groups).failure(:consumer_groups_inclusion) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems