client

package
v0.6.1-0...-efaa8b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func (client *Client) CheckRemoteFile(md5 string) (bool, error)

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) DownloadAsset

func (client *Client) DownloadAsset(md5 string) (string, 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 *Client) ListDeploys(namePattern string, limitToken bool,
	count int) (*api.DeploymentStatsResponse, error)

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)

func (*Client) Respond

func (client *Client) Respond(messageId string, msg string, isErr bool) error

func (*Client) Stats

func (client *Client) Stats() (*api.SystemStatsResponse, error)

func (*Client) Upload

func (client *Client) Upload(fpath string) (*api.SimpleResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL