httpgraph

package
v0.0.0-...-084b0cb Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGraphSeriesDefinition

type APIGraphSeriesDefinition struct {
	Label  string `json:"label,omitempty"`
	Show   *bool  `json:"show,omitempty"`
	Fill   string `json:"fill,omitempty"`
	Stroke string `json:"stroke,omitempty"`
}

type APIGraphSeriesNullable

type APIGraphSeriesNullable interface {
	MarshalJSON() ([]byte, error)
}

type APIGraphSeriesValuesNullableFromFloat64

type APIGraphSeriesValuesNullableFromFloat64 []float64

func (APIGraphSeriesValuesNullableFromFloat64) MarshalJSON

func (s APIGraphSeriesValuesNullableFromFloat64) MarshalJSON() ([]byte, error)

type APIGraphSeriesValuesNullableFromInt64

type APIGraphSeriesValuesNullableFromInt64 []int64

func (APIGraphSeriesValuesNullableFromInt64) MarshalJSON

func (s APIGraphSeriesValuesNullableFromInt64) MarshalJSON() ([]byte, error)

type APIJobGraphResponse

type APIJobGraphResponse struct {
	Success bool                              `json:"success"`
	Reason  string                            `json:"reason"`
	Message string                            `json:"message"`
	Labels  []string                          `json:"labels"`
	Data    map[string]APIGraphSeriesNullable `json:"data"`
	Series  []APIGraphSeriesDefinition        `json:"series"`

	MaxValue float64 `json:"maxValue"`
}

type Graph

type Graph struct{}

func (*Graph) From

func (g *Graph) From(req *http.Request) error

func (Graph) String

func (g Graph) String() string

type GraphDataWriter

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

func (*GraphDataWriter) Done

func (w *GraphDataWriter) Done(seriesVariable string) []byte

func (*GraphDataWriter) FloatSeries

func (w *GraphDataWriter) FloatSeries(label string, arr []float64) *GraphDataWriter

func (*GraphDataWriter) HideLast

func (w *GraphDataWriter) HideLast() *GraphDataWriter

func (*GraphDataWriter) Int64Series

func (w *GraphDataWriter) Int64Series(label string, arr []int64) *GraphDataWriter

func (*GraphDataWriter) Series

func (w *GraphDataWriter) Series(label string, fn func(buf []byte) []byte) *GraphDataWriter

func (*GraphDataWriter) StringSeries

func (w *GraphDataWriter) StringSeries(label string, arr []string) *GraphDataWriter

func (*GraphDataWriter) Var

func (w *GraphDataWriter) Var(variable string) *GraphDataWriter

type Server

type Server struct {
	DB *metricdb.DB
}

func (*Server) HandleAPIJobGraph

func (s *Server) HandleAPIJobGraph(w http.ResponseWriter, req *http.Request)

func (*Server) HandleGraph

func (s *Server) HandleGraph(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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