The Go Programming Language

Package ironmq

import "ironmq_go"

Package files

ironmq.go

type 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

Build version release.r60.3 10073+. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.