Documentation ¶
Index ¶
- func Initialize(ctx context.Context, cfg *Config, namingService service.DiscoverServer, ...) error
- type AdminOperateServer
- type Config
- type ConnCountResp
- type ConnReq
- type ConnStatsResp
- type ScopeLevel
- type Server
- func (s *Server) BatchCleanInstances(ctx context.Context, batchSize uint32) (uint32, error)
- func (s *Server) CleanInstance(ctx context.Context, req *apiservice.Instance) *apiservice.Response
- func (s *Server) CloseConnections(_ context.Context, reqs []ConnReq) error
- func (s *Server) FreeOSMemory(_ context.Context) error
- func (svr *Server) GetCMDBInfo(ctx context.Context) ([]model.LocationView, error)
- func (s *Server) GetLastHeartbeat(_ context.Context, req *apiservice.Instance) *apiservice.Response
- func (s *Server) GetLogOutputLevel(_ context.Context) ([]ScopeLevel, error)
- func (s *Server) GetServerConnStats(_ context.Context, req *ConnReq) (*ConnStatsResp, error)
- func (s *Server) GetServerConnections(_ context.Context, req *ConnReq) (*ConnCountResp, error)
- func (s *Server) ListLeaderElections(_ context.Context) ([]*model.LeaderElection, error)
- func (s *Server) ReleaseLeaderElection(_ context.Context, electKey string) error
- func (s *Server) SetLogOutputLevel(_ context.Context, scope string, level string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(ctx context.Context, cfg *Config, namingService service.DiscoverServer, healthCheckServer *healthcheck.Server, cacheMgn *cache.CacheManager, storage store.Store) error
Initialize 初始化
Types ¶
type AdminOperateServer ¶
type AdminOperateServer interface { // GetServerConnections Get connection count GetServerConnections(ctx context.Context, req *ConnReq) (*ConnCountResp, error) // GetServerConnStats 获取连接缓存里面的统计信息 GetServerConnStats(ctx context.Context, req *ConnReq) (*ConnStatsResp, error) // CloseConnections Close connection by ip CloseConnections(ctx context.Context, reqs []ConnReq) error // FreeOSMemory Free system memory FreeOSMemory(ctx context.Context) error // CleanInstance Clean deleted instance CleanInstance(ctx context.Context, req *apiservice.Instance) *apiservice.Response // BatchCleanInstances Batch clean deleted instances BatchCleanInstances(ctx context.Context, batchSize uint32) (uint32, error) // GetLastHeartbeat Get last heartbeat GetLastHeartbeat(ctx context.Context, req *apiservice.Instance) *apiservice.Response // GetLogOutputLevel Get log output level GetLogOutputLevel(ctx context.Context) ([]ScopeLevel, error) // SetLogOutputLevel Set log output level by scope SetLogOutputLevel(ctx context.Context, scope string, level string) error // ListLeaderElections ListLeaderElections(ctx context.Context) ([]*model.LeaderElection, error) // ReleaseLeaderElection ReleaseLeaderElection(ctx context.Context, electKey string) error // GetCMDBInfo get cmdb info GetCMDBInfo(ctx context.Context) ([]model.LocationView, error) }
AdminOperateServer Maintain related operation
type Config ¶
Config maintain configuration
func DefaultConfig ¶ added in v1.17.3
func DefaultConfig() *Config
type ConnCountResp ¶
type ConnStatsResp ¶
type ScopeLevel ¶ added in v1.17.3
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BatchCleanInstances ¶
func (*Server) CleanInstance ¶
func (s *Server) CleanInstance(ctx context.Context, req *apiservice.Instance) *apiservice.Response
func (*Server) CloseConnections ¶
func (*Server) GetCMDBInfo ¶
func (*Server) GetLastHeartbeat ¶
func (s *Server) GetLastHeartbeat(_ context.Context, req *apiservice.Instance) *apiservice.Response
func (*Server) GetLogOutputLevel ¶
func (s *Server) GetLogOutputLevel(_ context.Context) ([]ScopeLevel, error)
func (*Server) GetServerConnStats ¶
func (*Server) GetServerConnections ¶
func (*Server) ListLeaderElections ¶
func (*Server) ReleaseLeaderElection ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.