server

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricMiddleware

func MetricMiddleware(handler http.Handler) http.Handler

MetricMiddleware wraps a http handler with prometheus metric instruments

Types

type Server

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

Server is the navigator server that handles HTTP requests for charts

func New

func New(logger log.Logger) *Server

New returns a new server

func (*Server) AddGitBackedRepository

func (s *Server) AddGitBackedRepository(url string, directories []string)

AddGitBackedRepository adds a new git backed repository to the server

func (*Server) Logger

func (s *Server) Logger() log.Logger

Logger returns the server logger

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) UpdateRepositories

func (s *Server) UpdateRepositories() error

UpdateRepositories fetches changes from the source repositories and indexes new updates

Jump to

Keyboard shortcuts

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