controller

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 49 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpHandlers = []interface{}{
	nodeHandlers,
	nodeExitNodeHandlers,
	gwHandlers,
	userHandlers,
	networkHandlers,
	dnsHandlers,
	fileHandlers,
	serverHandlers,
	extClientHandlers,
	ipHandlers,
	loggerHandlers,
	hostHandlers,
	enrollmentKeyHandlers,
	aclHandlers,
	deviceHandlers,
	egressHandlers,
	internetGatewayHandlers,
	orgHandlers,
}

HttpHandlers - handler functions for REST interactions

View Source
var HttpMiddlewares = []mux.MiddlewareFunc{
	middleware.DB,
	userMiddleWare,
}

HttpMiddlewares - middleware functions for REST interactions

View Source
var ListRoles = listRoles

Functions

func AuthorizeHost added in v1.5.1

func AuthorizeHost(
	next http.Handler,
) http.HandlerFunc

AuthorizeHost - middleware that authenticates a host via JWT and ensures the host is only operating on its own resources (matched by hostid/nodeid path params).

func HandleRESTRequests

func HandleRESTRequests(wg *sync.WaitGroup, ctx context.Context)

Types

type RateLimiter added in v1.6.0

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

func NewRateLimiter added in v1.6.0

func NewRateLimiter(ctx context.Context, r rate.Limit, b int, lockout time.Duration) *RateLimiter

func (*RateLimiter) Middleware added in v1.6.0

func (rl *RateLimiter) Middleware(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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