simplejsonserver

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler added in v1.12.0

type Handler struct {
	Fetcher    func() (*data.Table, error)
	Accumulate bool
}

func (*Handler) Endpoints added in v1.12.0

func (h *Handler) Endpoints() simplejson.Endpoints

Endpoints implements the grafana-json Endpoint function. It returns all supported endpoints

type Server

type Server struct {
	simplejson.Server
	Reporter     *reporter.Client
	Demographics demographics.Fetcher
}

Server groups Grafana SimpleJson API handlers that retrieve Belgium COVID-19-related statistics

func (*Server) Health added in v1.11.0

func (s *Server) Health(w http.ResponseWriter, _ *http.Request)

func (*Server) Initialize added in v1.10.0

func (s *Server) Initialize(ctx context.Context)

Initialize starts background tasks to support Server

func (*Server) Run

func (s *Server) Run(port int) (err error)

Run runs the API handler server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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