From a228b098968ebd8af0d530dd04feb23cfefb29f3 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 11 Jan 2022 21:59:15 +0300 Subject: [PATCH] correct schema 2.0 Signed-off-by: Valery Piashchynski --- .rr.yaml | 357 ++++++++++++++++++--------------- schemas/config/2.0.schema.json | 5 +- 2 files changed, 200 insertions(+), 162 deletions(-) diff --git a/.rr.yaml b/.rr.yaml index 00383ec..b942544 100644 --- a/.rr.yaml +++ b/.rr.yaml @@ -490,7 +490,6 @@ http: # Empty for the memory config: {} - # File uploading settings. uploads: # Directory for file uploads. Empty value means to use $TEMP based on your OS. @@ -1025,15 +1024,19 @@ jobs: # This option is required. Possible values: amqp, memory, sqs, beanstalk, boltdb driver: memory - # Pipeline priority + # Driver's configuration # - # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. - priority: 10 + # Should not be empty + config: + # Pipeline priority + # + # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. + priority: 10 - # Number of job to prefetch from the driver. - # - # Default: 100_000. - prefetch: 10000 + # Number of job to prefetch from the driver. + # + # Default: 100_000. + prefetch: 10000 # Pipeline name # @@ -1044,20 +1047,24 @@ jobs: # This option is required. Possible values: amqp, memory, sqs, beanstalk, boltdb driver: boltdb - # BoldDB file to create or DB to use + # Driver's configuration # - # Default: "rr.db" - file: "path/to/rr.db" + # Should not be empty + config: + # BoldDB file to create or DB to use + # + # Default: "rr.db" + file: "path/to/rr.db" - # Pipeline priority - # - # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. - priority: 10 + # Pipeline priority + # + # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. + priority: 10 - # Number of job to prefetch from the driver. - # - # Default: 100_000. - prefetch: 10000 + # Number of job to prefetch from the driver. + # + # Default: 100_000. + prefetch: 10000 test-local-2: # Driver name @@ -1065,52 +1072,67 @@ jobs: # This option is required. driver: amqp - # QoS - prefetch. - # - # Default: 10 - prefetch: 10 - - # Pipeline priority - # - # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. - priority: 1 - - # Queue name - # - # Default: default - queue: test-1-queue - - # Exchange name - # - # Default: amqp.default - exchange: default - - # Exchange type - # - # Default: direct. - exchange_type: direct - - # Routing key for the queue - # - # Default: empty. - routing_key: test - - # Declare a queue exclusive at the exchange - # - # Default: false - exclusive: false - - # When multiple is true, this delivery and all prior unacknowledged deliveries - # on the same channel will be acknowledged. This is useful for batch processing - # of deliveries - # - # Default:false - multiple_ack: false - - # Use rabbitmq mechanism to requeue the job on fail - # - # Default: false - requeue_on_fail: false + # Driver's configuration + # + # Should not be empty + config: + + # QoS - prefetch. + # + # Default: 10 + prefetch: 10 + + # Pipeline priority + # + # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. + priority: 1 + + # Durable queue + # + # Default: false + durable: false + + # Delete queue when stopping the pipeline + # + # Default: false + delete_queue_on_stop: false + + # Queue name + # + # Default: default + queue: test-1-queue + + # Exchange name + # + # Default: amqp.default + exchange: default + + # Exchange type + # + # Default: direct. + exchange_type: direct + + # Routing key for the queue + # + # Default: empty. + routing_key: test + + # Declare a queue exclusive at the exchange + # + # Default: false + exclusive: false + + # When multiple is true, this delivery and all prior unacknowledged deliveries + # on the same channel will be acknowledged. This is useful for batch processing + # of deliveries + # + # Default:false + multiple_ack: false + + # Use rabbitmq mechanism to requeue the job on fail + # + # Default: false + requeue_on_fail: false test-local-3: # Driver name @@ -1118,25 +1140,30 @@ jobs: # This option is required. driver: beanstalk - # Pipeline priority + # Driver's configuration # - # Default - priority: 11 + # Should not be empty + config: - # Beanstalk internal tube priority - # - # Default: 1 - tube_priority: 1 + # Pipeline priority + # + # Default + priority: 11 - # Tube name - # - # Default: default - tube: default-1 + # Beanstalk internal tube priority + # + # Default: 1 + tube_priority: 1 - # If no job is available before this timeout has passed, Reserve returns a ConnError recording ErrTimeout. - # - # Default: 5s - reserve_timeout: 10s + # Tube name + # + # Default: default + tube: default-1 + + # If no job is available before this timeout has passed, Reserve returns a ConnError recording ErrTimeout. + # + # Default: 5s + reserve_timeout: 10s test-local-4: # Driver name @@ -1144,47 +1171,52 @@ jobs: # This option is required. driver: sqs - # Pipeline priority - # - # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. - priority: 10 - - # Number of jobs to prefetch from the SQS. mazon SQS never returns more messages than this value - # (however, fewer messages might be returned). Valid values: 1 to 10. - # - # Default: 10 - prefetch: 10 - - # The duration (in seconds) that the received messages are hidden from subsequent - # retrieve requests after being retrieved by a ReceiveMessage request - # - # Default: 0 - visibility_timeout: 0 - - # The duration (in seconds) for which the call waits for a message to arrive - # in the queue before returning. If a message is available, the call returns - # sooner than WaitTimeSeconds. If no messages are available and the wait time - # expires, the call returns successfully with an empty list of messages. - # - # Default: 0 - wait_time_seconds: 0 - - # Queue name. - # - # Default: default - queue: default - - # List of the AWS SQS attributes https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html. - attributes: - DelaySeconds: 0 - MaximumMessageSize: 262144 - MessageRetentionPeriod: 345600 - ReceiveMessageWaitTimeSeconds: 0 - VisibilityTimeout: 30 - # Tags don't have any semantic meaning. Amazon SQS interprets tags as character - # strings. - tags: - test: "tag" + # Driver's configuration + # + # Should not be empty + config: + + # Pipeline priority + # + # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. + priority: 10 + + # Number of jobs to prefetch from the SQS. mazon SQS never returns more messages than this value + # (however, fewer messages might be returned). Valid values: 1 to 10. + # + # Default: 10 + prefetch: 10 + + # The duration (in seconds) that the received messages are hidden from subsequent + # retrieve requests after being retrieved by a ReceiveMessage request + # + # Default: 0 + visibility_timeout: 0 + + # The duration (in seconds) for which the call waits for a message to arrive + # in the queue before returning. If a message is available, the call returns + # sooner than WaitTimeSeconds. If no messages are available and the wait time + # expires, the call returns successfully with an empty list of messages. + # + # Default: 0 + wait_time_seconds: 0 + + # Queue name. + # + # Default: default + queue: default + + # List of the AWS SQS attributes https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html. + attributes: + DelaySeconds: 0 + MaximumMessageSize: 262144 + MessageRetentionPeriod: 345600 + ReceiveMessageWaitTimeSeconds: 0 + VisibilityTimeout: 30 + # Tags don't have any semantic meaning. Amazon SQS interprets tags as character + # strings. + tags: + test: "tag" test-local-5: # Driver name @@ -1192,45 +1224,50 @@ jobs: # This option is required driver: nats - # Pipeline priority - # - # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. - priority: 2 - - # NATS prefetch - # - # Messages to read into the channel - prefetch: 100 - - # NATS subject - # - # Default: default - subject: default - - # NATS stream - # - # Default: default-stream - stream: foo - - # The consumer will only start receiving messages that were created after the consumer was created - # - # Default: false (deliver all messages from the stream beginning) - deliver_new: true - - # Consumer rate-limiter in bytes https://docs.nats.io/jetstream/concepts/consumers#ratelimit - # - # Default: 1000 - rate_limit: 100 - - # Delete the stream when after pipeline was stopped - # - # Default: false - delete_stream_on_stop: false - - # Delete message from the stream after successful acknowledge - # - # Default: false - delete_after_ack: false + # Driver's configuration + # + # Should not be empty + config: + + # Pipeline priority + # + # If the job has priority set to 0, it will inherit the pipeline's priority. Default: 10. + priority: 2 + + # NATS prefetch + # + # Messages to read into the channel + prefetch: 100 + + # NATS subject + # + # Default: default + subject: default + + # NATS stream + # + # Default: default-stream + stream: foo + + # The consumer will only start receiving messages that were created after the consumer was created + # + # Default: false (deliver all messages from the stream beginning) + deliver_new: true + + # Consumer rate-limiter in bytes https://docs.nats.io/jetstream/concepts/consumers#ratelimit + # + # Default: 1000 + rate_limit: 100 + + # Delete the stream when after pipeline was stopped + # + # Default: false + delete_stream_on_stop: false + + # Delete message from the stream after successful acknowledge + # + # Default: false + delete_after_ack: false # list of pipelines to be consumed by the server automatically at the start, keep empty if you want to start consuming manually consume: diff --git a/schemas/config/2.0.schema.json b/schemas/config/2.0.schema.json index d444564..76b8f94 100644 --- a/schemas/config/2.0.schema.json +++ b/schemas/config/2.0.schema.json @@ -362,9 +362,10 @@ "type": "object", "properties": { "driver": { - "type": "array", "description": "Driver to store cached responses", + "type": "string", "items": { + "maxItems": 1, "type": "string", "enum": [ "memory" @@ -374,10 +375,10 @@ }, "cache_methods": { "type": "array", - "description": "HTTP methods to cache", "default": "GET", "items": { "type": "string", + "description": "HTTP methods to cache", "enum": [ "GET", "POST",