routes

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerLabel = "Mimisbrunnr"
)

Functions

func BuildHealthRoutes

func BuildHealthRoutes(in HealthRoutesIn)

BuildHealthRoutes sets up health handler

func BuildMetricsRoutes

func BuildMetricsRoutes(in MetricsRoutesIn)

BuildMetricsRoutes sets up metrics handler

func BuildPrimaryRoutes

func BuildPrimaryRoutes(router PrimaryRouter, pin PostRoutesIn, gin GetRoutesIn, din DeleteRoutesIn, puin PutRoutesIn, gain GetAllRoutesIn, pein PostEventRouteIn)

BuildPrimaryRoutes sets up all endpoint handlers for application

func ProvideServerChainFactory

func ProvideServerChainFactory(in ServerChainIn) xhttpserver.ChainFactory

ProvideServerChainFactory returns ChainFactory needed to set up primary server

Types

type DeleteRoutesIn

type DeleteRoutesIn struct {
	fx.In
	Handler http.Handler `name:"deleteHandler"`
}

type GetAllRoutesIn

type GetAllRoutesIn struct {
	fx.In
	Handler http.Handler `name:"getAllHandler"`
}

type GetRoutesIn

type GetRoutesIn struct {
	fx.In
	Handler http.Handler `name:"getHandler"`
}

type HandlerIn

type HandlerIn struct {
	fx.In
	Registry    *registry.Registry
	Manager     *manager.Manager
	EventParser *eventParser.EventParser
}

HandlerIn is the set of dependencies for this package's components

type HandlerOut

type HandlerOut struct {
	fx.Out

	PostKeyHandler http.Handler `name:"postHandler"`

	GetKeyHandler http.Handler `name:"getHandler"`

	DeleteKeyHandler http.Handler `name:"deleteHandler"`

	GetAllKeyHandler http.Handler `name:"getAllHandler"`

	PutKeyHandler http.Handler `name:"putHandler"`

	EventsKeyHandler http.Handler `name:"eventHandler"`
}

HandlerOut is the set of components emitted by this package

func Provide

func Provide(in HandlerIn) HandlerOut

Provide is an uber/fx style provider for this package's components

type HealthRoutesIn

type HealthRoutesIn struct {
	fx.In
	Router  *mux.Router `name:"servers.health"`
	Handler xhealth.Handler
}

type MetricsRoutesIn

type MetricsRoutesIn struct {
	fx.In
	Router  *mux.Router `name:"servers.metrics"`
	Handler xmetricshttp.Handler
}

type PostEventRouteIn

type PostEventRouteIn struct {
	fx.In
	Handler http.Handler `name:"eventHandler"`
}

type PostRoutesIn

type PostRoutesIn struct {
	fx.In
	Handler http.Handler `name:"postHandler"`
}

type PrimaryRouter

type PrimaryRouter struct {
	fx.In
	Router  *mux.Router  `name:"servers.primary"`
	Handler http.Handler `name:"postHandler"`
}

type PutRoutesIn

type PutRoutesIn struct {
	fx.In
	Handler http.Handler `name:"putHandler"`
}

type ServerChainIn

type ServerChainIn struct {
	fx.In

	RequestCount     *prometheus.CounterVec   `name:"server_request_count"`
	RequestDuration  *prometheus.HistogramVec `name:"server_request_duration_ms"`
	RequestsInFlight *prometheus.GaugeVec     `name:"server_requests_in_flight"`

	AuthChain *alice.Chain `name:"auth_chain"`
}

ServerChainIn is the set of dependencies for this package's components

Jump to

Keyboard shortcuts

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