Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudTasksOption ¶
type CloudTasksOption interface { // String returns a string representation of the option. String() string // Type describes the type of the option. Type() CloudTasksOptionType // Value returns a value used to create this option. Value() interface{} }
func ProcessAt ¶
func ProcessAt(t time.Time) CloudTasksOption
ProcessAt returns an option to specify when to process the given task.
type CloudTasksOptionType ¶
type CloudTasksOptionType int
const (
ProcessAtOpt CloudTasksOptionType = iota
)
type CloudTasksQ ¶
type CloudTasksQ struct {
// contains filtered or unexported fields
}
func NewCloudTasksQ ¶
func NewCloudTasksQ(cfg Config, client *cloudtasks.Client) *CloudTasksQ
func (*CloudTasksQ) Enqueue ¶
func (q *CloudTasksQ) Enqueue(ctx context.Context, task *Task, opts ...CloudTasksOption) (*TaskInfo, error)
type ICloudTasksQ ¶
type PubSubMessage ¶
type PubSubMessage struct { Message struct { ID string `json:"messageId"` PublishTime time.Time `json:"publishTime"` Data []byte `json:"data,omitempty"` OrderingKey string `json:"orderingKey,omitempty"` Attributes map[string]string `json:"attributes,omitempty"` } `json:"message"` Subscription string `json:"subscription"` }
PubSubMessage is the payload of a Pub/Sub event. See the documentation for more details: https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
func (*PubSubMessage) GetUniqueKey ¶
func (m *PubSubMessage) GetUniqueKey() string
func (*PubSubMessage) UnmarshalData ¶
func (m *PubSubMessage) UnmarshalData(v interface{}) error
type PubSubOption ¶
type PubSubOption interface { // String returns a string representation of the option. String() string // Type describes the type of the option. Type() PubSubOptionType // Value returns a value used to create this option. Value() interface{} }
func Ordered ¶
func Ordered(key string) PubSubOption
Ordered returns an option to specify the ordered key.
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task represents a unit of work to be performed.
type TaskOption ¶
type TaskOption interface { // String returns a string representation of the option. String() string // Type describes the type of the option. Type() TaskOptionType // Value returns a value used to create this option. Value() interface{} }
func UniqueKey ¶
func UniqueKey(key string) TaskOption
UniqueKey returns an option to specify the unique key.
Click to show internal directories.
Click to hide internal directories.