
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
github.com/usace/go-simple-asyncer
Nothing fancy, a simple library with a goal of being able to switch between Async services like AWS Lambda, AWS SNS, Various Message Queues, or "Mock" for testing without changing underlying code. This is accomplished using a common interface with a CallAsync(functionName string, payload []byte) error
method. Here's what it looks like in practice:
// myAsyncer creates a new asyncer
myAsyncer, err := asyncer.NewAsyncer(
asyncer.Config{Engine: "AWSSNS", Target: "my-sns-topic"},
)
// Use myAsyncer
if err := ae.CallAsync("corpsmap-cumulus-packager", payload); err != nil {
return nil, err
}
Note: It's helpful to pair this library with something like https://github.com/kelseyhightower/envconfig to store asyncer configuration strings as environment variables.
If only a queue name is provided as Target
, for example myqueue1
, it is assumed that this is running on Amazon Web Services against SQS. Environment variables provided at runtime, such as "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION" will be necessary to correctly build appropriate SQS service URLs.
Prefixing Target
with local/
and providing an absolute URL (i.e. Target: local/http://localhost:9324/queue/queue1
allows use of a SQS-api compliant message queue such as ElasticMQ or LocalStack.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.