snapstats

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ApiVersion = "v1"

Variables

View Source
var (
	ErrNotFound     = errors.New("Not Found")
	ErrAuthFailure  = errors.New("Authentication failed")
	ErrAccessDenied = errors.New("Access denied")
	ErrNilResponse  = errors.New("Nil response")
)

Functions

func ToQueryString

func ToQueryString(q interface{}) (string, error)

Convert an interface{} to a urlencoded querystring

Types

type Body

type Body struct {
	ScheduledTasks []Task
}

type Client

type Client struct {
	URL *url.URL
	// contains filtered or unexported fields
}

func NewClient

func NewClient(serverUrl string, insecure bool) (*Client, error)

func (*Client) GetTasks

func (c *Client) GetTasks() ([]Task, error)

type Message

type Message struct {
	Body *Body `json:"body"`
}

type Snapstats

type Snapstats struct {
}

func (*Snapstats) CollectMetrics

func (n *Snapstats) CollectMetrics(mts []plugin.Metric) ([]plugin.Metric, error)

CollectMetrics collects metrics for testing

func (*Snapstats) GetConfigPolicy

func (f *Snapstats) GetConfigPolicy() (plugin.ConfigPolicy, error)

func (*Snapstats) GetMetricTypes

func (n *Snapstats) GetMetricTypes(cfg plugin.Config) ([]plugin.Metric, error)

type Task

type Task struct {
	HitCount    int    `json:"hit_count"`
	FailedCount int    `json:"failed_count"`
	TaskState   string `json:"task_state"`
}

Jump to

Keyboard shortcuts

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