Documentation
¶
Index ¶
- type ServiceManageImpl
- func (s *ServiceManageImpl) Destroy() error
- func (s *ServiceManageImpl) FetchMetricsForServiceLastSixHour(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
- func (s *ServiceManageImpl) FetchMetricsForServiceLastTwoHour(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
- func (s *ServiceManageImpl) FetchMetricsForServiceRecent(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
- func (s *ServiceManageImpl) FetchServiceInfo(ctx context.Context) (*ServiceManage.AllServices, error)
- func (s *ServiceManageImpl) FetchServiceMetricsForLastDay(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
- func (s *ServiceManageImpl) FetchServiceStatus(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.IsPriority, error)
- func (s *ServiceManageImpl) Init() error
- func (s *ServiceManageImpl) MsgPublish(ctx context.Context, msg string) error
- func (s *ServiceManageImpl) SetBestService(ctx context.Context, Service *ServiceManage.Service) error
- func (s *ServiceManageImpl) UnRegisterService(ctx context.Context, Service *ServiceManage.Service) error
- func (s *ServiceManageImpl) UnSetBestService(ctx context.Context, Service *ServiceManage.Service) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceManageImpl ¶
type ServiceManageImpl struct { //Mongo客户端 MongoClient *mongo.Client //依赖指标 MetricSvc MetricManage.MetricService //微服务端口和地址 ServerIpaddr string ServerPort string // contains filtered or unexported fields }
func (*ServiceManageImpl) Destroy ¶
func (s *ServiceManageImpl) Destroy() error
func (*ServiceManageImpl) FetchMetricsForServiceLastSixHour ¶
func (s *ServiceManageImpl) FetchMetricsForServiceLastSixHour(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
TODO 取指定服务的6小时内的指标
func (*ServiceManageImpl) FetchMetricsForServiceLastTwoHour ¶
func (s *ServiceManageImpl) FetchMetricsForServiceLastTwoHour(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
TODO 获取指定服务2小时的指标
func (*ServiceManageImpl) FetchMetricsForServiceRecent ¶
func (s *ServiceManageImpl) FetchMetricsForServiceRecent(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
TODO 获取指定服务12小时内的指标
func (*ServiceManageImpl) FetchServiceInfo ¶
func (s *ServiceManageImpl) FetchServiceInfo(ctx context.Context) (*ServiceManage.AllServices, error)
TODO implement 获取服务信息
func (*ServiceManageImpl) FetchServiceMetricsForLastDay ¶
func (s *ServiceManageImpl) FetchServiceMetricsForLastDay(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.TimeSeriesData, error)
TODO 获取指定服务24小时内的指标
func (*ServiceManageImpl) FetchServiceStatus ¶
func (s *ServiceManageImpl) FetchServiceStatus(ctx context.Context, service *ServiceManage.Service) (*ServiceManage.IsPriority, error)
func (*ServiceManageImpl) Init ¶
func (s *ServiceManageImpl) Init() error
func (*ServiceManageImpl) MsgPublish ¶
func (s *ServiceManageImpl) MsgPublish(ctx context.Context, msg string) error
func (*ServiceManageImpl) SetBestService ¶
func (s *ServiceManageImpl) SetBestService(ctx context.Context, Service *ServiceManage.Service) error
TODO implement http 指定服务为最优
func (*ServiceManageImpl) UnRegisterService ¶
func (s *ServiceManageImpl) UnRegisterService(ctx context.Context, Service *ServiceManage.Service) error
TODO implement http 服务注销---删除服务
func (*ServiceManageImpl) UnSetBestService ¶
func (s *ServiceManageImpl) UnSetBestService(ctx context.Context, Service *ServiceManage.Service) error
Click to show internal directories.
Click to hide internal directories.