Documentation
¶
Index ¶
- Constants
- Variables
- func AtoiDefault(s string, def int) int
- func ClampPage(p int) int
- func ClearQueues(queues ...string) error
- func DeleteItem(queue, raw string) error
- func EmailTasks(queue string, page, pageSize int) ([]redis.EmailTask, error)
- func ErrorRecords(page, pageSize int) ([]redis.EmailErrorRecord, error)
- func Inspect(queue string, limit int64) ([]string, error)
- func ListLen(queue string) (int64, error)
- func LogLen(name string) (int64, error)
- func MoveItem(from, to, raw string) error
- func Pattern(prefixless string) string
- func ResendTask(rawTask string) error
- func RetryTasks(page, pageSize int) ([]redis.EmailTask, error)
- func RunOne(send func(redis.EmailTask) error) (bool, error)
- func SentRecords(page, pageSize int) ([]redis.EmailSentRecord, error)
- func SetLen(queue string) (int64, error)
- type Handler
- type KeySummary
- func KeysPage(pattern string, page, pageSize int) ([]KeySummary, int, error)
- func ScanKeys(pattern string, startCursor uint64, want int) ([]KeySummary, uint64, error)
- func ScanKeysBounded(pattern string, startCursor uint64, want int) (out []KeySummary, next uint64, scanned int, err error)
- func Summary(key string) KeySummary
- type LoadError
- type Overview
- type Pager
- type Section
Constants ¶
View Source
const DefaultPageSize = 10
Variables ¶
View Source
var Messages = map[string]string{
"queue_cleared": "Queue cleared.",
"system_error": "Something went wrong. Check the server log.",
"empty_or_error": "The queue is empty or could not be read.",
"invalid_item": "That queue item could not be read.",
"send_failed": "Sending failed. The task was moved to the dead letter queue.",
"processed_one": "One task sent.",
"requeue_failed": "Could not requeue the task.",
"dlq_empty": "The dead letter queue is empty.",
"requeued_one": "One task requeued.",
"missing_item": "No item was given.",
"item_deleted": "Item deleted.",
"moved_to_dlq": "Moved to the dead letter queue.",
"requeued_item": "Item requeued.",
"resend_failed": "Could not queue the email again.",
"resend_queued": "Email queued again.",
"redis_not_ready": "Redis is not connected.",
}
Functions ¶
func AtoiDefault ¶
func ClearQueues ¶
func DeleteItem ¶
func ErrorRecords ¶
func ErrorRecords(page, pageSize int) ([]redis.EmailErrorRecord, error)
func ResendTask ¶
func SentRecords ¶
func SentRecords(page, pageSize int) ([]redis.EmailSentRecord, error)
Types ¶
type Handler ¶ added in v1.4.0
type Handler struct {
Path string
Render func(w http.ResponseWriter, r *http.Request, ov *Overview)
Flash func(w http.ResponseWriter, r *http.Request, kind, key string)
Send func(redis.EmailTask) error
Extra func(w http.ResponseWriter, r *http.Request, action string) bool
}
func (*Handler) Action ¶ added in v1.4.0
func (h *Handler) Action(w http.ResponseWriter, r *http.Request)
type KeySummary ¶
func ScanKeysBounded ¶ added in v1.4.0
func Summary ¶
func Summary(key string) KeySummary
type Overview ¶ added in v1.4.0
type Overview struct {
EmailQueueSize int64
DeadLetterQueueSize int64
PageSize int
EmailTotal int64
EmailPage int
EmailPages int
EmailPrev int
EmailNext int
EmailTasks []redis.EmailTask
DeadTotal int64
DeadPage int
DeadPages int
DeadPrev int
DeadNext int
DeadTasks []redis.EmailTask
SentTotal int64
SentPage int
SentPages int
SentPrev int
SentNext int
SentRecords []redis.EmailSentRecord
EmailErrTotal int64
EmailErrPage int
EmailErrPages int
EmailErrPrev int
EmailErrNext int
EmailErrRecords []redis.EmailErrorRecord
KeyPage int
Errors []LoadError
}
func (Overview) FormatErrors ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.