Package ironmq
import "ironmq_go"
Package files
ironmq.gotype Client
A Client contains an Iron.io project ID and a token for authentication.
type Client struct {
// contains filtered or unexported fields
}
func NewClient
func NewClient(projectId, token string) *Client
NewClient returns a new Client using the given project ID and token. The network is not used during this call.
func (*Client) Queue
func (c *Client) Queue(name string) *Queue
Queue returns a Queue using the given name. The network is not used during this call.
type Error
type Error struct {
Status int
Msg string
}
func (*Error) String
func (e *Error) String() string
type Message
type Message struct {
Id string `json:"id,omitempty"`
Body string `json:"body"`
// Timeout is the amount of time allowed for processing a message.
Timeout int64 `json:"timeout,omitempty"`
// contains filtered or unexported fields
}
func (*Message) Delete
func (m *Message) Delete() os.Error
type Queue
Queue represents an IronMQ queue.
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) Get
func (q *Queue) Get() (*Message, os.Error)
Get takes one Message off of the queue. The Message will be returned to the queue if not deleted before the item's timeout.
func (*Queue) Push
func (q *Queue) Push(msg string) os.Error
Push adds a message to the queue using IronMQ's default timeout of 10 minutes.
func (*Queue) PushTimeout
func (q *Queue) PushTimeout(msg string, timeout int64) os.Error