admin

package
v0.0.0-...-ef1509a Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LockRouterGroupReadsRoute    = "LockRouterGroupReads"
	UnlockRouterGroupReadsRoute  = "UnlockRouterGroupReads"
	LockRouterGroupWritesRoute   = "LockRouterGroupWrites"
	UnlockRouterGroupWritesRoute = "UnlockRouterGroupWrites"
)

Variables

View Source
var AdminRoutesMap = map[string]rata.Route{
	LockRouterGroupReadsRoute:    {Path: "/lock_router_group_reads", Method: "PUT", Name: LockRouterGroupReadsRoute},
	UnlockRouterGroupReadsRoute:  {Path: "/unlock_router_group_reads", Method: "PUT", Name: UnlockRouterGroupReadsRoute},
	LockRouterGroupWritesRoute:   {Path: "/lock_router_group_writes", Method: "PUT", Name: LockRouterGroupWritesRoute},
	UnlockRouterGroupWritesRoute: {Path: "/unlock_router_group_writes", Method: "PUT", Name: UnlockRouterGroupWritesRoute},
}

Functions

func AdminRoutes

func AdminRoutes() rata.Routes

func NewServer

func NewServer(port int, db db.DB, logger lager.Logger) (ifrit.Runner, error)

Types

type RouterGroupLockHandler

type RouterGroupLockHandler struct {
	// contains filtered or unexported fields
}

func NewRouterGroupLockHandler

func NewRouterGroupLockHandler(database db.DB, logger lager.Logger) *RouterGroupLockHandler

func (*RouterGroupLockHandler) LockReads

func (h *RouterGroupLockHandler) LockReads(w http.ResponseWriter, req *http.Request)

func (*RouterGroupLockHandler) LockWrites

func (h *RouterGroupLockHandler) LockWrites(w http.ResponseWriter, req *http.Request)

func (*RouterGroupLockHandler) UnlockReads

func (h *RouterGroupLockHandler) UnlockReads(w http.ResponseWriter, req *http.Request)

func (*RouterGroupLockHandler) UnlockWrites

func (h *RouterGroupLockHandler) UnlockWrites(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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