queue

package
v0.0.0-...-1b8f325 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	Function         string `json:"function"`
	DDBTablePrefix   string `json:"ddb_table_prefix"`
	DeliveryStream   string `json:"delivery_stream"`
	SQSRunnerURL     string `json:"sqs_runner_url"`
	S3Bucket         string `json:"s3_bucket"`
	TwitterAPIKey    string `json:"twitter_api_key"`
	TwitterAPISecret string `json:"twitter_api_secret"`
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

Configuration structure.

func NewSQS

func NewSQS(opts ...func(*Config)) *Config

func (*Config) GetAttribs

func (config *Config) GetAttribs() (map[string]string, error)

func (*Config) Purge

func (config *Config) Purge() error

func (*Config) SendRunnerMessage

func (config *Config) SendRunnerMessage(params *SendMessage) error

type Option

type Option func(config *Config)

func SetLogger

func SetLogger(log *logrus.Logger) Option

func SetProfile

func SetProfile(profile string) Option

func SetRegion

func SetRegion(region string) Option

func SetSQSURL

func SetSQSURL(sqsQueueURL string) Option

type ProcessorMessage

type ProcessorMessage struct {
	UserID    int64  `json:"user_id"`
	TweetID   string `json:"tweet_id"`
	EntityURL string `json:"entity_url"`
}

type SendMessage

type SendMessage struct {
	Bootstrap *Bootstrap        `json:"bootstrap"`
	Message   *ProcessorMessage `json:"message"`
}

Jump to

Keyboard shortcuts

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