http

package
v0.0.0-...-dbfa1ae Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the http server to expose an API for the cluster.

func NewHTTPServer

func NewHTTPServer(logger hclog.Logger, srv *cluster.Server, addr string) (*Server, error)

NewHTTPServer creates a new http server

func (*Server) Close

func (s *Server) Close()

Close closes the http server

func (*Server) MetricsRequest

func (s *Server) MetricsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error)

MetricsRequest is the metrics endpoint

func (*Server) StatusLeader

func (s *Server) StatusLeader(resp http.ResponseWriter, req *http.Request) (interface{}, error)

StatusLeader returns the leader

func (*Server) StatusPeers

func (s *Server) StatusPeers(resp http.ResponseWriter, req *http.Request) (interface{}, error)

StatusPeers returns the list of peers

Jump to

Keyboard shortcuts

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