api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 21 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 HTTPHandler

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

type HTTPServer

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

func NewHTTPServer

func NewHTTPServer(cfg config.API, lg *zap.Logger,
	proxy *proxy.SQLServer,
	nsmgr *mgrns.NamespaceManager, cfgmgr *mgrcfg.ConfigManager,
	crtmgr *mgrcrt.CertManager, handler HTTPHandler,
	ready *atomic.Bool) (*HTTPServer, error)

func (*HTTPServer) Close

func (h *HTTPServer) Close() error

func (*HTTPServer) ConfigGet

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

func (*HTTPServer) ConfigSet

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

func (*HTTPServer) DebugHealth

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

func (*HTTPServer) DebugRedirect

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

func (*HTTPServer) NamespaceCommit

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

func (*HTTPServer) NamespaceGet

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

func (*HTTPServer) NamespaceList

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

func (*HTTPServer) NamespaceRemove

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

func (*HTTPServer) NamespaceUpsert

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

Jump to

Keyboard shortcuts

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