Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a high-level Queue using the SQS backend. @group Constructors
Example: sqs shorthand constructor
q, err := sqsqueue.New(
"us-east-1",
queue.WithWorkers(4), // optional; default: runtime.NumCPU() (min 1)
)
if err != nil {
return
}
_ = q
func NewWithConfig ¶
NewWithConfig creates a high-level Queue using an explicit SQS driver config. @group Constructors
Example: sqs config constructor
q, err := sqsqueue.NewWithConfig(
sqsqueue.Config{
DriverBaseConfig: queueconfig.DriverBaseConfig{
DefaultQueue: "critical", // default if empty: "default"
Observer: nil, // default: nil
},
Region: "us-east-1", // default if empty: "us-east-1"
Endpoint: "", // optional; set for LocalStack/custom endpoint
AccessKey: "", // optional; static credentials
SecretKey: "", // optional; static credentials
},
queue.WithWorkers(4), // optional; default: runtime.NumCPU() (min 1)
)
if err != nil {
return
}
_ = q
Types ¶
type Config ¶
type Config struct {
queueconfig.DriverBaseConfig
Region string
Endpoint string
AccessKey string
SecretKey string
}
Config configures the SQS driver module constructor.
Click to show internal directories.
Click to hide internal directories.