controller

package
v0.0.0-...-d15be54 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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