queue

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidQueueTopic = errors.New("not a valid QueueTopic")

Functions

func ToPayload

func ToPayload(m any) []byte

Types

type BillingCreateCustomerOptions added in v0.4.0

type BillingCreateCustomerOptions struct {
	Workspace *malak.Workspace
	Email     malak.Email
}

type Message

type Message struct {
	ID       string
	Metadata map[string]string
	Data     []byte
}

type QueueHandler

type QueueHandler interface {
	io.Closer
	Add(context.Context, QueueTopic, any) error
	Start(context.Context)
}

type QueueTopic added in v0.4.0

type QueueTopic string

ENUM(billing_trial_ending,billing_create_customer, invite_team_member)

const (
	// QueueTopicBillingTrialEnding is a QueueTopic of type billing_trial_ending.
	QueueTopicBillingTrialEnding QueueTopic = "billing_trial_ending"
	// QueueTopicBillingCreateCustomer is a QueueTopic of type billing_create_customer.
	QueueTopicBillingCreateCustomer QueueTopic = "billing_create_customer"
	// QueueTopicInviteTeamMember is a QueueTopic of type invite_team_member.
	QueueTopicInviteTeamMember QueueTopic = "invite_team_member"
)

func ParseQueueTopic added in v0.4.0

func ParseQueueTopic(name string) (QueueTopic, error)

ParseQueueTopic attempts to convert a string to a QueueTopic.

func (QueueTopic) IsValid added in v0.4.0

func (x QueueTopic) IsValid() bool

IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values

func (QueueTopic) String added in v0.4.0

func (x QueueTopic) String() string

String implements the Stringer interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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