router

package
v4.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package router provides the router and API routes implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDebugRouter

func NewDebugRouter(cfg config.Server, a service.Authorizationd) *http.ServeMux

NewDebugRouter return the ServeMux with debug endpoints

func NewPolicyCacheHandler

func NewPolicyCacheHandler(authd service.Authorizationd) func(w http.ResponseWriter, r *http.Request) error

NewPolicyCacheHandler returns the handler function to handle get policy cache request.

Types

type Route

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

Route contains information and handler of an API endpoint

func NewDebugRoutes

func NewDebugRoutes(cfg config.Debug, a service.Authorizationd) []Route

NewDebugRoutes returns debug endpoint information. If Dump flag is enabled then the cache dump feature endpoint will be included. If Profiling flag is enable then the pprof interface endpoint will be included.

Jump to

Keyboard shortcuts

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