client

package
v0.0.0-...-11fa281 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

A NodNod client package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.Mutex

	Server string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(server string) *Client

Create a new client.

func (*Client) Connect

func (c *Client) Connect() error

Connect to NodNod server.

func (*Client) Connected

func (c *Client) Connected() bool

Check if client is connected.

func (*Client) Disconnect

func (c *Client) Disconnect()

Disconnect client from NodNod server.

func (*Client) Stat

func (c *Client) Stat() (stats.Stats, error)

Get stats of *only* connected NodNod server.

func (*Client) StatAll

func (c *Client) StatAll() (stats.Stats, error)

Get stats of all NodNod servers/cluster.

func (*Client) URL

func (c *Client) URL() string

type ConnectionErr

type ConnectionErr struct {
	// contains filtered or unexported fields
}

func (*ConnectionErr) Error

func (c *ConnectionErr) Error() string

type NotConnectedErr

type NotConnectedErr struct{}

func (*NotConnectedErr) Error

func (n *NotConnectedErr) Error() string

type StatFailedErr

type StatFailedErr struct {
	// contains filtered or unexported fields
}

func (*StatFailedErr) Error

func (s *StatFailedErr) Error() string

type TimeoutErr

type TimeoutErr struct{}

func (*TimeoutErr) Error

func (t *TimeoutErr) Error() string

Jump to

Keyboard shortcuts

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