haproxy-lb/pkg/api/v1/server/routes.go
2021-03-01 07:40:10 +01:00

26 lines
468 B
Go

package server
import (
"git.giftfish.de/ston1th/haproxy-lb/pkg/api/types"
schemav1 "git.giftfish.de/ston1th/haproxy-lb/pkg/api/v1/schema"
)
const v1 = "/" + schemav1.Version
var routes = []types.Route{
{
"/healthz",
healthzHandler,
[]string{"GET"},
},
{
v1 + "/lb",
authHandler(lbListHandler),
[]string{"GET"},
},
{
v1 + "/lb/{cluster:[a-zA-Z0-9-]+}/{name:[a-zA-Z0-9-]+$}",
authHandler(lbHandler),
[]string{"GET", "POST", "DELETE"},
},
}