haproxy-lb/pkg/api/v1/server/handler.go
2021-03-06 16:51:36 +01:00

31 lines
571 B
Go

package server
import (
//"golang.org/x/crypto/bcrypt"
//"net/http"
"git.giftfish.de/ston1th/haproxy-lb/pkg/api/types"
)
func authHandler(h types.CtxHandler) types.CtxHandler {
return func(ctx *types.Context) {
// TODO
// test:123456
// test:$2b$10$zNfGTAQ94vifj2wtGsv1W.yZRe4/rDBzQixpB6FbrTed4BnHuNqBS
//bcrypt.CompareHashAndPassword(hash, pw)
h(ctx)
}
}
func healthzHandler(ctx *types.Context) {
// TODO maybe report etcd/raft stats
ctx.OK()
}
func lbListHandler(ctx *types.Context) {
ctx.OK()
}
func lbHandler(ctx *types.Context) {
ctx.OK()
}