Documentation ¶
Index ¶
Constants ¶
View Source
const ( DiscoverAccess string = "discover" RegisterAccess string = "register" HealthcheckAccess string = "healthcheck" )
Variables ¶
View Source
var (
Slots = make(map[string]Apiserver)
)
Functions ¶
func GetClientOpenMethod ¶
GetClientOpenMethod 获取客户端openMethod
Types ¶
type Apiserver ¶
type Apiserver interface { // GetProtocol API协议名 GetProtocol() string // GetPort API的监听端口 GetPort() uint32 // Initialize API初始化逻辑 Initialize(ctx context.Context, option map[string]interface{}, api map[string]APIConfig) error // Run API服务的主逻辑循环 Run(errCh chan error) // Stop 停止API端口监听 Stop() // Restart 重启API Restart(option map[string]interface{}, api map[string]APIConfig, errCh chan error) error }
Apiserver API服务器接口
Click to show internal directories.
Click to hide internal directories.