server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 28 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServeGRPC

func ListenAndServeGRPC(addr string, opts []grpc.ServerOption,
	c cache.Cache, a cache.Logger, e cache.Logger) error

func ServeGRPC

func ServeGRPC(l net.Listener, opts []grpc.ServerOption,
	c cache.Cache, a cache.Logger, e cache.Logger) error

Types

type HTTPCache

type HTTPCache interface {
	CacheHandler(w http.ResponseWriter, r *http.Request)
	StatusPageHandler(w http.ResponseWriter, r *http.Request)
}

HTTPCache ...

func NewHTTPCache

func NewHTTPCache(cache cache.Cache, accessLogger cache.Logger, errorLogger cache.Logger, validateAC bool, commit string) HTTPCache

NewHTTPCache returns a new instance of the cache. accessLogger will print one line for each HTTP request to stdout. errorLogger will print unexpected server errors. Inexistent files and malformed URLs will not be reported.

Jump to

Keyboard shortcuts

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