meterstatus

package
v0.0.0-...-6cf1bc9 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package meterstatus contains an implementation of the api facade to watch the meter status of a unit for changes and return the current meter status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client provides access to the meter status API.

func (*Client) MeterStatus

func (c *Client) MeterStatus() (statusCode, statusInfo string, rErr error)

MeterStatus is part of the MeterStatusClient interface.

func (*Client) WatchMeterStatus

func (c *Client) WatchMeterStatus() (watcher.NotifyWatcher, error)

WatchMeterStatus is part of the MeterStatusClient interface.

type MeterStatusClient

type MeterStatusClient interface {
	// MeterStatus returns the meter status and additional information for the
	// API client.
	MeterStatus() (string, string, error)
	// WatchMeterStatus returns a watcher for observing changes to the unit's meter
	// status.
	WatchMeterStatus() (watcher.NotifyWatcher, error)
}

MeterStatusClient defines the methods on the MeterStatus API end point.

func NewClient

func NewClient(caller base.APICaller, tag names.UnitTag) MeterStatusClient

NewClient creates a new client for accessing the MeterStatus API.

Jump to

Keyboard shortcuts

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