server

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAPICacheDuration = time.Second * 2
)

Variables

View Source
var (
	HeaderCommonName = "common-name"
)
View Source
var (
	NodeCollector plugin.QuotaCollector
)

Functions

func ExtractNodeCommonNameFromCert

func ExtractNodeCommonNameFromCert(c *gin.Context)

func ExtractNodeCommonNameFromHeader

func ExtractNodeCommonNameFromHeader(c *gin.Context)

func Health

func Health(c *gin.Context)

func LoggerHandler

func LoggerHandler(c *gin.Context)

func NoMethodHandler

func NoMethodHandler(c *gin.Context)

func NoRouteHandler

func NoRouteHandler(c *gin.Context)

func RequestIDHandler

func RequestIDHandler(c *gin.Context)

Types

type AdminServer

type AdminServer struct {
	Auth             service.AuthService
	License          service.LicenseService
	Quota            service.QuotaService
	ExternalHandlers []gin.HandlerFunc
	APICache         persist.CacheStore
	// contains filtered or unexported fields
}

AdminServer admin server

func NewAdminServer

func NewAdminServer(config *config.CloudConfig) (*AdminServer, error)

NewAdminServer create admin server

func (*AdminServer) AuthHandler

func (s *AdminServer) AuthHandler(c *gin.Context)

auth handler

func (*AdminServer) Close

func (s *AdminServer) Close()

Close server

func (*AdminServer) Errorf added in v2.6.1

func (s *AdminServer) Errorf(msg string, vals ...interface{})

func (*AdminServer) GetRoute

func (s *AdminServer) GetRoute() *gin.Engine

GetRoute get router

func (*AdminServer) InitRoute

func (s *AdminServer) InitRoute()

InitRoute init router

func (*AdminServer) NodeQuotaHandler

func (s *AdminServer) NodeQuotaHandler(c *gin.Context)

func (*AdminServer) Run

func (s *AdminServer) Run()

func (*AdminServer) SetAPI

func (s *AdminServer) SetAPI(api *api.API)

func (*AdminServer) WrapperCache added in v2.6.1

func (s *AdminServer) WrapperCache(handler common.HandlerFunc) func(c *gin.Context)

func (*AdminServer) WrapperCacheDuration added in v2.6.1

func (s *AdminServer) WrapperCacheDuration(handler common.HandlerFunc, dur time.Duration) func(c *gin.Context)

type HandlerMessage

type HandlerMessage func(msg specV1.Message) (*specV1.Message, error)

type InitServer

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

func NewInitServer

func NewInitServer(config *config.CloudConfig) (*InitServer, error)

NewInitServer new init server

func (*InitServer) Close

func (s *InitServer) Close()

Close close server

func (*InitServer) GetRoute

func (s *InitServer) GetRoute() *gin.Engine

GetRoute get router

func (*InitServer) InitRoute

func (s *InitServer) InitRoute()

func (*InitServer) Run

func (s *InitServer) Run()

Run run server

func (*InitServer) SetAPI

func (s *InitServer) SetAPI(api *api.InitAPI)

type MisServer

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

MisServer mis server

func NewMisServer

func NewMisServer(config *config.CloudConfig) (*MisServer, error)

NewMisServer create Mis server

func (*MisServer) Close

func (s *MisServer) Close()

Close close server

func (*MisServer) GetRoute

func (s *MisServer) GetRoute() *gin.Engine

func (*MisServer) InitRoute

func (s *MisServer) InitRoute()

func (*MisServer) Run

func (s *MisServer) Run()

Run run server

func (*MisServer) SetAPI

func (s *MisServer) SetAPI(api *api.API)

type SyncServer

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

func NewSyncServer

func NewSyncServer(cfg *config.CloudConfig) (*SyncServer, error)

func (*SyncServer) AddMsgRouter added in v2.2.0

func (s *SyncServer) AddMsgRouter(router string, handler HandlerMessage)

func (*SyncServer) Close

func (s *SyncServer) Close()

func (*SyncServer) InitMsgRouter

func (s *SyncServer) InitMsgRouter()

func (*SyncServer) Run

func (s *SyncServer) Run()

func (*SyncServer) SetSyncAPI

func (s *SyncServer) SetSyncAPI(a api.SyncAPI)

Jump to

Keyboard shortcuts

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