api

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefAPILimit is the global API limit per second.
	DefAPILimit = 100
	// DefConnTimeout is used as timeout duration in the HTTP server.
	DefConnTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendReader added in v1.2.0

type BackendReader interface {
	GetBackendMetrics() []byte
}

type HTTPHandler

type HTTPHandler interface {
	RegisterHTTP(c *gin.Engine) error
}

type Managers added in v1.3.0

type Managers struct {
	CfgMgr        *mgrcfg.ConfigManager
	NsMgr         mgrns.NamespaceManager
	CertMgr       *mgrcrt.CertManager
	BackendReader BackendReader
	ReplayJobMgr  mgrrp.JobManager
}

type Server

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

func NewServer

func NewServer(cfg config.API, lg *zap.Logger, mgr Managers, handler HTTPHandler, ready *atomic.Bool) (*Server, error)

func (*Server) BackendMetrics added in v1.2.0

func (h *Server) BackendMetrics(c *gin.Context)

func (*Server) Close

func (h *Server) Close() error

func (*Server) ConfigGet

func (h *Server) ConfigGet(c *gin.Context)

func (*Server) ConfigSet

func (h *Server) ConfigSet(c *gin.Context)

func (*Server) DebugHealth

func (h *Server) DebugHealth(c *gin.Context)

func (*Server) DebugRedirect

func (h *Server) DebugRedirect(c *gin.Context)

func (*Server) NamespaceCommit

func (h *Server) NamespaceCommit(c *gin.Context)

func (*Server) NamespaceGet

func (h *Server) NamespaceGet(c *gin.Context)

func (*Server) NamespaceList

func (h *Server) NamespaceList(c *gin.Context)

func (*Server) NamespaceRemove

func (h *Server) NamespaceRemove(c *gin.Context)

func (*Server) NamespaceUpsert

func (h *Server) NamespaceUpsert(c *gin.Context)

func (*Server) PreClose added in v1.2.0

func (h *Server) PreClose()

func (*Server) TrafficCancel added in v1.3.1

func (h *Server) TrafficCancel(c *gin.Context)

func (*Server) TrafficCapture added in v1.3.0

func (h *Server) TrafficCapture(c *gin.Context)

func (*Server) TrafficReplay added in v1.3.0

func (h *Server) TrafficReplay(c *gin.Context)

func (*Server) TrafficShow added in v1.3.0

func (h *Server) TrafficShow(c *gin.Context)

Jump to

Keyboard shortcuts

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