debug

package
v0.0.0-...-12a582f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SQSQueueURL    = "https://sqs.us-east-1.amazonaws.com/463883388309/platform-payment-events"
	SQSQueueURLDev = ""
)
View Source
var Cmd = &cobra.Command{
	Use:   "debug",
	Short: "debug",
	Run: func(cmd *cobra.Command, args []string) {
		listener, err := subscriber.NewSQSSubscriber(SQSQueueURL)

		if err != nil {
			log.Error(err)
			return
		}

		go func() {
			<-listener.Start()
		}()

		go func() {
			err := <-listener.ErrorChannel
			log.Error(err)
		}()

		for m := range listener.ListenChannel {
			fmt.Println(*m.Body)

			listener.Delete(m.ReceiptHandle)
		}
	},
}

Cmd is the command for the cli tool

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL