1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- package services
- import (
- "context"
- "io"
- "github.com/aws/aws-sdk-go-v2/service/sqs"
- "github.com/fgm/izidic"
- )
- type CreateMoveTaskOutput struct {
- Status *string // Running
- SourceARN *string
- ApproximateNumberOfMessagesMoved int
- }
- // Redriver defines the behavior of DLQ redriver services.
- //
- // See https://github.com/aws/aws-sdk-go-v2/issues/1991
- // about the commented-out methods.
- type Redriver interface {
- // CreateMoveTask()
- // ListMoveTasks() []any
- ListDLQs() map[string]string
- }
- type redriver struct {
- }
- func (r redriver) CreateMoveTask() {
- // TODO implement me
- // u := url.URL{
- // Scheme: "https",
- // User: nil,
- // Host: "",
- // Path: "",
- // RawPath: "",
- // OmitHost: false,
- // ForceQuery: false,
- // RawQuery: "",
- // Fragment: "",
- // RawFragment: "",
- // }
- /*
- Action=CreateMoveTask
- &SourceArn=arn%3Aaws%3Asqs%3Aeu-west-3%3A751146239996%3Atest-dlq
- &TaskName=079228fe-098b-436d-a2f4-cb4d29ebb55a
- &Version=2012-11-05
- */
- }
- func (r redriver) ListMoveTasks() []any {
- // TODO implement me
- panic("implement me")
- }
- func RedriverService(dic *izidic.Container) (any, error) {
- cli := dic.MustService(SvcClient).(*sqs.Client)
- w := dic.MustParam(PWriter).(io.Writer)
- return func(ctx context.Context, qName string) {
- senderHandler(ctx, w, cli, qName)
- }, nil
- }
|