filters

package
v0.0.0-...-73856a8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is also replicated in github.com/lolibrary/lolibrary/foundation and set at compile time.

Functions

func ClientFilters

func ClientFilters(req typhon.Request, svc typhon.Service) typhon.Response

ClientFilters runs a set of filters to allow sending requests to other services.

func ClientURLFilter

func ClientURLFilter(req typhon.Request, svc typhon.Service) typhon.Response

func CommonFilters

func CommonFilters(req typhon.Request, svc typhon.Service) typhon.Response

CommonFilters runs every "common" filter against a service. This is used to globally update filters.

func EdgeProxyFilter

func EdgeProxyFilter(endpoint string) typhon.Filter

EdgeProxyFilter proxies a request via the edge proxy by inserting the given hostname if missing.

func HealthCheckFilter

func HealthCheckFilter(req typhon.Request, svc typhon.Service) typhon.Response

HealthCheckFilter checks if the incoming request is GET /healthz and returns a response. TODO: implement proper health checking by polling the service for a non-200.

func PanicFilter

func PanicFilter(req typhon.Request, svc typhon.Service) (rsp typhon.Response)

PanicFilter catches any panics that happen while serving.

func PingFilter

func PingFilter(req typhon.Request, svc typhon.Service) typhon.Response

PingFilter checks if the incoming request is GET /ping and returns a response.

func VersionFilter

func VersionFilter(req typhon.Request, svc typhon.Service) typhon.Response

VersionFilter returns the git hash of this version. It is used to see if this service is up to date.

Types

This section is empty.

Jump to

Keyboard shortcuts

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