 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type FailedTask
- type NitricTask
- type QueueService
- type ReceiveOptions
- type SendBatchResponse
- type UnimplementedQueuePlugin
- func (*UnimplementedQueuePlugin) Complete(queue string, leaseId string) error
- func (*UnimplementedQueuePlugin) Receive(options ReceiveOptions) ([]NitricTask, error)
- func (*UnimplementedQueuePlugin) Send(queue string, task NitricTask) error
- func (*UnimplementedQueuePlugin) SendBatch(queue string, tasks []NitricTask) (*SendBatchResponse, error)
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailedTask ¶
type FailedTask struct {
	Task    *NitricTask
	Message string
}
    FailedTask - A task that has failed to be queued
type NitricTask ¶
type NitricTask struct {
	ID          string                 `json:"id,omitempty"`
	LeaseID     string                 `json:"leaseId,omitempty"`
	PayloadType string                 `json:"payloadType,omitempty"`
	Payload     map[string]interface{} `json:"payload,omitempty"`
}
    NitricTask - A task for asynchronous processing
type QueueService ¶
type QueueService interface {
	// Send - Send a single task to a queue
	Send(queue string, task NitricTask) error
	// SendBatch - sends multiple tasks to a queue
	SendBatch(queue string, tasks []NitricTask) (*SendBatchResponse, error)
	// Receive - Receives one or more tasks(s) off a queue
	Receive(options ReceiveOptions) ([]NitricTask, error)
	// Complete - Marks a received task as completed
	Complete(queue string, leaseId string) error
}
    QueueService - The Nitric plugin interface for cloud native queue adapters
type ReceiveOptions ¶
type ReceiveOptions struct {
	// Nitric name for the queue.
	//
	// queueName is a required field
	QueueName string `type:"string" required:"true"`
	// Max depth of queue messages to receive from the queue.
	//
	// If nil or 0, defaults to depth 1.
	Depth *uint32 `type:"int" required:"false"`
}
    func (*ReceiveOptions) Validate ¶
func (p *ReceiveOptions) Validate() error
type SendBatchResponse ¶
type SendBatchResponse struct {
	FailedTasks []*FailedTask
}
    type UnimplementedQueuePlugin ¶
type UnimplementedQueuePlugin struct {
	QueueService
}
    UnimplementedQueuePlugin - A Default interface, that provide implementations of QueueService methods that Flag the method as unimplemented
func (*UnimplementedQueuePlugin) Complete ¶
func (*UnimplementedQueuePlugin) Complete(queue string, leaseId string) error
func (*UnimplementedQueuePlugin) Receive ¶
func (*UnimplementedQueuePlugin) Receive(options ReceiveOptions) ([]NitricTask, error)
func (*UnimplementedQueuePlugin) Send ¶
func (*UnimplementedQueuePlugin) Send(queue string, task NitricTask) error
Push - Unimplemented Stub for the UnimplementedQueuePlugin
func (*UnimplementedQueuePlugin) SendBatch ¶
func (*UnimplementedQueuePlugin) SendBatch(queue string, tasks []NitricTask) (*SendBatchResponse, error)
 Click to show internal directories. 
   Click to hide internal directories.