router

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package router defines routes in Athenz client sidecar and their corresponding handling function. It also wrap the handling function to accept expected HTTP methods only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns Routed ServeMux

Types

type Route

type Route struct {
	Name        string
	Methods     []string
	Pattern     string
	HandlerFunc handler.Func
}

Route manages the routing for sidecar.

func NewRoutes

func NewRoutes(cfg config.Config, h handler.Handler) []Route

NewRoutes returns Route slice.

Jump to

Keyboard shortcuts

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