Skip to content

Commit

Permalink
docs: improve sinks docs regarding retry configs (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan authored Jul 14, 2023
1 parent b9f419e commit 8a4bb5e
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 30 deletions.
1 change: 1 addition & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [AWS S3](./sinks/aws_s3.md)
- [GCP PubSub](./sinks/gcp_pubsub.md)
- [Redis Streams](./sinks/redis_streams.md)
- [RabbitMQ](./sinks/rabbitmq.md)
- [Reference](reference/README.md)
- [Data Dictionary](./reference/data_dictionary.md)
- [Advanced Features](./advanced/README.md)
Expand Down
1 change: 1 addition & 0 deletions book/src/sinks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ These are the existing sinks that are included as part the main _Oura_ codebase:
- [AWS Lamda](aws_lambda.md): a sink that invokes an AWS Lambda function for each event.
- [AWS S3](aws_s3.md): a sink that saves the CBOR content of the blocks as an AWS S3 object.
- [Redis Streams](redis_streams.md): a sink that sends each event into a Redis stream.
- [RabbitMQ](rabbitmq.md): a sink that sends each event into a RabbitMQ exchange.

New sinks are being developed, information will be added in this documentation to reflect the updated list. Contributions and feature request are welcome in our [Github Repo](https://github.com/txpipe/oura).
2 changes: 1 addition & 1 deletion book/src/sinks/aws_sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The sink will process each incoming event in sequence and submit the correspondi

The sink support both FIFO and Standard queues. The sink configuration will determine which logic to apply. In case of FIFO, it is necessary to enable `content-based deduplication` and the group id is determined by an explicit configuration value or `oura-sink` by default.

The sink uses AWS SDK's built-in retry logic which can be configured at the sink level. Authentication against AWS is built-in in the SDK library and follows the common chain of providers (env vars, ~/.aws, etc).
Authentication against AWS is built-in in the SDK library and follows the common chain of providers (env vars, ~/.aws, etc).

## Configuration

Expand Down
1 change: 0 additions & 1 deletion book/src/sinks/elastic.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ password = "my very secret stuff"
- `url`: the location of the Elasticsearch's API
- `index`: the name of the index (or data stream) to store the event documents
- `idempotency` (optional): flag that if enabled will force idempotent calls to ES (to avoid duplicates)
- `retry_policy` (optional): controls the policy to retry failed requests (see [retry policy](../advanced/retry_policy.md))

### Section: `sink.credentials`

Expand Down
9 changes: 0 additions & 9 deletions book/src/sinks/gcp_cloudfunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@ A sink that sends each event to a cloud function. Each event is json-encoded and
type = "GcpCloudFunction"
url = "https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME"
timeout = 30000
error_policy = "Continue"
authorization = true

[sink.headers]
extra_header_1 = "abc"
extra_header_2 = "123"

[sink.retry_policy]
max_retries = 30
backoff_unit = 5000
backoff_factor = 2
max_backoff = 100000
```

### Section: `sink`
Expand All @@ -30,8 +23,6 @@ max_backoff = 100000
- `timeout` (optional): the timeout value for the HTTP response in milliseconds. Default value is `30000`.
- `authorization` (optional): value to add as the 'Authorization' HTTP header
- `headers` (optional): key-value map of extra headers to pass in each HTTP call
- `error_policy` (optional): either `Continue` or `Exit`. Default value is `Exit`.
- [retry_policy](../advanced/retry_policy.md)

### GCP Authentication

Expand Down
8 changes: 0 additions & 8 deletions book/src/sinks/gcp_pubsub.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,12 @@ A sink that sends each event as a message to a PubSub topic. Each event is json-
[sink]
type = "GcpPubSub"
topic = "test"

[sink.retry_policy]
max_retries = 30
backoff_unit = 5000
backoff_factor = 2
max_backoff = 100000
```

### Section: `sink`

- `type`: the literal value `GcpPubSub`.
- `topic`: the short name of the topic to send message to.
- `error_policy` (optional): either `Continue` or `Exit`. Default value is `Exit`.
- [retry_policy](../advanced/retry_policy.md)

### GCP Authentication

Expand Down
1 change: 0 additions & 1 deletion book/src/sinks/rabbitmq.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ routing_key = ""
- `uri`: uri to connect on rabbitmq server.
- `exchange` field with the name of the exchange where the cardano event will be published.
- `routing_key` field with cardano event routing key configuration.
- [retry_policy](../advanced/retry_policy.md)
9 changes: 1 addition & 8 deletions book/src/sinks/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ authorization = "user:pass"
timeout = 30000
error_policy = "Continue"

[sink.retry_policy]
max_retries = 30
backoff_unit = 5000
backoff_factor = 2
max_backoff = 100000

[sink.headers]
extra_header_1 = "abc"
extra_header_2 = "123"
Expand All @@ -33,5 +27,4 @@ extra_header_2 = "123"
- `headers` (optional): key-value map of extra headers to pass in each HTTP call
- `allow_invalid_certs` (optional): a flag to skip TLS cert validation (usually for self-signed certs).
- `timeout` (optional): the timeout value for the HTTP response in milliseconds. Default value is `30000`.
- `error_policy` (optional): either `Continue` or `Exit`. Default value is `Exit`.
- `retry_policy` (optional): controls the policy to retry failed requests (see [retry policy](../advanced/retry_policy.md))

2 changes: 0 additions & 2 deletions src/sinks/webhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ pub struct Config {
/// use-case for this flag is to allow self-signed certificates. Beware that
/// other invalid properties will be omitted too, such as expiration date.
pub allow_invalid_certs: Option<bool>,

pub retries: Option<gasket::retries::Policy>,
}

impl Config {
Expand Down

0 comments on commit 8a4bb5e

Please sign in to comment.