Skip to content

Commit

Permalink
feat(new source): add AWS SQS source (#9968)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Fox <fuchsnj@gmail.com>
  • Loading branch information
fuchsnj authored Nov 12, 2021
1 parent 2549379 commit b273b78
Show file tree
Hide file tree
Showing 42 changed files with 1,259 additions and 188 deletions.
287 changes: 287 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ metrics = { version = "0.17.0", default-features = false, features = ["std"] }
metrics-tracing-context = { version = "0.8.0", default-features = false }
metrics-util = { version = "0.10.1", default-features = false, features = ["std"] }

# Aws
# AWS - Rusoto
rusoto_cloudwatch = { version = "0.47.0", optional = true }
rusoto_core = { version = "0.47.0", features = ["encoding"], optional = true }
rusoto_credential = { version = "0.47.0", optional = true }
Expand All @@ -145,6 +145,12 @@ rusoto_signature = { version = "0.47.0", optional = true }
rusoto_sqs = { version = "0.47.0", optional = true }
rusoto_sts = { version = "0.47.0", optional = true }

# AWS - Official SDK
aws-config = {version = "0.0.22-alpha", optional = true}
aws-types = {version = "0.0.22-alpha", optional = true}
aws-sdk-sqs = {version = "0.0.22-alpha", optional = true}


# Azure
azure_core = { git = "https://github.com/Azure/azure-sdk-for-rust.git", rev = "16bcf0ab1bb6e380d966a69d314de1e99ede553a", default-features = false, features = ["enable_reqwest"], optional = true }
azure_storage = { git = "https://github.com/Azure/azure-sdk-for-rust.git", rev = "16bcf0ab1bb6e380d966a69d314de1e99ede553a", default-features = false, features = ["blob"], optional = true }
Expand Down Expand Up @@ -416,6 +422,7 @@ sources = ["sources-logs", "sources-metrics"]
sources-logs = [
"sources-aws_kinesis_firehose",
"sources-aws_s3",
"sources-aws_sqs",
"sources-datadog_agent",
"sources-docker_logs",
"sources-exec",
Expand Down Expand Up @@ -454,6 +461,7 @@ sources-apache_metrics = []
sources-aws_ecs_metrics = []
sources-aws_kinesis_firehose = ["base64", "infer", "sources-utils-tls", "warp", "codecs"]
sources-aws_s3 = ["rusoto", "rusoto_s3", "rusoto_sqs", "semver", "uuid", "codecs", "zstd"]
sources-aws_sqs = ["aws-config", "aws-types", "aws-sdk-sqs", "codecs"]
sources-datadog_agent = ["snap", "sources-utils-tls", "warp", "sources-utils-http-error", "protobuf-build", "codecs"]
sources-dnstap = ["base64", "data-encoding", "trust-dns-proto", "dnsmsg-parser", "protobuf-build"]
sources-docker_logs = ["docker"]
Expand Down Expand Up @@ -728,7 +736,7 @@ aws-ecs-metrics-integration-tests = ["sources-aws_ecs_metrics"]
aws-kinesis-firehose-integration-tests = ["rusoto_es", "sinks-aws_kinesis_firehose", "sinks-elasticsearch"]
aws-kinesis-streams-integration-tests = ["sinks-aws_kinesis_streams"]
aws-s3-integration-tests = ["sinks-aws_s3", "sources-aws_s3"]
aws-sqs-integration-tests = ["sinks-aws_sqs"]
aws-sqs-integration-tests = ["sinks-aws_sqs", "sources-aws_sqs"]
azure-blob-integration-tests = ["sinks-azure_blob"]
clickhouse-integration-tests = ["sinks-clickhouse", "warp"]
docker-logs-integration-tests = ["sources-docker_logs", "unix"]
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,18 @@ ifeq ($(AUTODESPAWN), true)
@scripts/setup_integration_env.sh aws stop
endif

.PHONY: test-integration-aws-sqs
test-integration-aws-sqs: ## Runs AWS SQS integration tests
ifeq ($(AUTOSPAWN), true)
@scripts/setup_integration_env.sh aws stop
@scripts/setup_integration_env.sh aws start
sleep 10 # Many services are very slow... Give them a sec...
endif
${MAYBE_ENVIRONMENT_EXEC} cargo test --no-fail-fast --no-default-features --features aws-sqs-integration-tests --lib ::aws_sqs
ifeq ($(AUTODESPAWN), true)
@scripts/setup_integration_env.sh aws stop
endif

.PHONY: test-integration-azure
test-integration-azure: ## Runs Azure integration tests
ifeq ($(AUTOSPAWN), true)
Expand Down
Loading

0 comments on commit b273b78

Please sign in to comment.