v1

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGetGroup

func HandleGetGroup(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleGetGroups

func HandleGetGroups(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleGetMetric

func HandleGetMetric(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleGetMetrics

func HandleGetMetrics(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleGetStatus

func HandleGetStatus(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandlePatchStatus

func HandlePatchStatus(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func NewHandler

func NewHandler() http.Handler

Types

type Check

type Check struct {
	ID     string `json:"id"`
	Path   string `json:"path"`
	Name   string `json:"name"`
	Passes int64  `json:"passes"`
	Fails  int64  `json:"fails"`
}

func NewCheck

func NewCheck(c *lib.Check) Check

type Error

type Error api2go.Error

func (Error) Error

func (e Error) Error() string

type ErrorResponse

type ErrorResponse struct {
	Errors []Error `json:"errors"`
}

type Group

type Group struct {
	ID     string  `json:"-"`
	Path   string  `json:"path"`
	Name   string  `json:"name"`
	Checks []Check `json:"checks"`

	Parent   *Group   `json:"-"`
	ParentID string   `json:"-"`
	Groups   []*Group `json:"-"`
	GroupIDs []string `json:"-"`
}

func FlattenGroup

func FlattenGroup(g *Group) []*Group

func NewGroup

func NewGroup(g *lib.Group, parent *Group) *Group

func (Group) GetID

func (g Group) GetID() string

func (Group) GetReferencedIDs

func (g Group) GetReferencedIDs() []jsonapi.ReferenceID

func (Group) GetReferences

func (g Group) GetReferences() []jsonapi.Reference

func (*Group) SetID

func (g *Group) SetID(v string) error

func (*Group) SetToManyReferenceIDs

func (g *Group) SetToManyReferenceIDs(name string, ids []string) error

func (*Group) SetToOneReferenceID

func (g *Group) SetToOneReferenceID(name, id string) error

type Metric

type Metric struct {
	Name string `json:"-"`

	Type     NullMetricType `json:"type"`
	Contains NullValueType  `json:"contains"`
	Tainted  null.Bool      `json:"tainted"`

	Sample map[string]float64 `json:"sample"`
}

func NewMetric

func NewMetric(m *stats.Metric) Metric

func (Metric) GetID

func (m Metric) GetID() string

func (*Metric) SetID

func (m *Metric) SetID(id string) error

type NullMetricType

type NullMetricType struct {
	Type  stats.MetricType
	Valid bool
}

func (NullMetricType) MarshalJSON

func (t NullMetricType) MarshalJSON() ([]byte, error)

func (*NullMetricType) UnmarshalJSON

func (t *NullMetricType) UnmarshalJSON(data []byte) error

type NullValueType

type NullValueType struct {
	Type  stats.ValueType
	Valid bool
}

func (NullValueType) MarshalJSON

func (t NullValueType) MarshalJSON() ([]byte, error)

func (*NullValueType) UnmarshalJSON

func (t *NullValueType) UnmarshalJSON(data []byte) error

type Status

type Status struct {
	Paused null.Bool `json:"paused"`
	VUs    null.Int  `json:"vus"`
	VUsMax null.Int  `json:"vus-max"`

	// Readonly.
	Running bool `json:"running"`
	Tainted bool `json:"tainted"`
}

func NewStatus

func NewStatus(engine *core.Engine) Status

func (Status) GetID

func (s Status) GetID() string

func (Status) GetName

func (s Status) GetName() string

func (Status) SetID

func (s Status) SetID(id string) error

Jump to

Keyboard shortcuts

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