Documentation ¶
Index ¶
- type Client
- func (client *Client) CheckRemoteFile(md5 string) (bool, error)
- func (client *Client) ClientStatus() (api.ClientStatusCollection, error)
- func (client *Client) Delete(msgId string) (*api.DeleteMessageResponse, error)
- func (client *Client) DeploymentDetail(id string) (*api.DeploymentStatsResponse, error)
- func (client *Client) DeregisterMailbox(m string) (*api.SimpleResponse, error)
- func (client *Client) DownloadAsset(md5 string) (string, error)
- func (client *Client) Get() (*api.GetMessageResponse, error)
- func (client *Client) ListDeploys(namePattern string, limitToken bool, count int) (*api.DeploymentStatsResponse, error)
- func (client *Client) PollDeployment(depId string, f func(*api.DeploymentStats) bool) (*api.DeploymentStats, error)
- func (client *Client) Put(mbxs []string, pattern string, msg string, deploymentName string, asset string) (*api.PutMessageResponse, error)
- func (client *Client) RegisterMailbox(m string) (*api.RegisterResponse, error)
- func (client *Client) Respond(messageId string, msg string, isErr bool) error
- func (client *Client) Stats() (*api.SystemStatsResponse, error)
- func (client *Client) Upload(fpath string) (*api.SimpleResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Host string AccessKeyName string AccessKey string Mailbox string ShowRequests bool UseProxy bool ProxyAddress string }
Client is used to connect to the postmaster server to receive and send messages through the queue.
func (*Client) CheckRemoteFile ¶
Checks if the remote server has a specified file. Before upload a file this method is called to verify that the server does not already contian this file. That way clients do not upload the file when unnessecary.
func (*Client) ClientStatus ¶
func (client *Client) ClientStatus() (api.ClientStatusCollection, error)
func (*Client) Delete ¶
func (client *Client) Delete(msgId string) (*api.DeleteMessageResponse, error)
Delete removes a message from the server. This is generally called after a message has been successfully processed to remove it from the mailbox queue.
func (*Client) DeploymentDetail ¶
func (client *Client) DeploymentDetail(id string) (*api.DeploymentStatsResponse, error)
func (*Client) DeregisterMailbox ¶
func (client *Client) DeregisterMailbox(m string) (*api.SimpleResponse, error)
func (*Client) Get ¶
func (client *Client) Get() (*api.GetMessageResponse, error)
Get retrieves a message from the server via a JSON api.
func (*Client) ListDeploys ¶
func (*Client) PollDeployment ¶
func (client *Client) PollDeployment(depId string, f func(*api.DeploymentStats) bool) (*api.DeploymentStats, error)
func (*Client) Put ¶
func (client *Client) Put(mbxs []string, pattern string, msg string, deploymentName string, asset string) (*api.PutMessageResponse, error)
Put sends a message to a series of mailboxes. An array of mailboxes can be provided, as well as a pattern using '*' as wildcards. The message will by sent to all matching mailboxes.
func (*Client) RegisterMailbox ¶
func (client *Client) RegisterMailbox(m string) (*api.RegisterResponse, error)