router

package
v0.0.0-...-432d548 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// RouteConfigKey the config key name
	RouteConfigKey           = "namespace-router"
	FiberRouteConfigKey      = "fiber-router"
	FiberStageRouteConfigKey = "fiber-stage-router"
)

Variables

View Source
var NoDefaultError = errors.New("no default route configed")

Functions

This section is empty.

Types

type Router

type Router interface {
	GetNamespace(appName string) (string, error)
	GetFiberId(app, az, region, stage, unit string) (string, error)
}

Router routes a GroupPlan request from app to a kubernetes namespace.

func NewConfigRouter

func NewConfigRouter(loader config.Configer) Router

NewConfigRouter creates a config router which loads routing from configs.

func NewGlobalConfigRouter

func NewGlobalConfigRouter() Router

func NewSimpleRouter

func NewSimpleRouter() Router

NewSimpleRouter creates a simple router.

Jump to

Keyboard shortcuts

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