Documentation ¶
Index ¶
- type MetricManageImpl
- func (m *MetricManageImpl) Destroy() error
- func (m *MetricManageImpl) FetchMetricsForServiceLastSixHour(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
- func (m *MetricManageImpl) FetchMetricsForServiceLastTwoHour(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
- func (m *MetricManageImpl) FetchMetricsForServiceRecent(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
- func (m *MetricManageImpl) FetchServiceMetricsForLastDay(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
- func (m *MetricManageImpl) Init() error
- func (m *MetricManageImpl) ReportMetrics(report MetricManage.MetricsService_ReportMetricsServer) error
- func (m *MetricManageImpl) StartServer()
- func (m *MetricManageImpl) UpdateMetrics(ctx context.Context, Metrics *MetricManage.MetricsData, id clientv3.LeaseID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricManageImpl ¶
type MetricManageImpl struct { //TODO etcd client EtcdClient *clientv3.Client //MongoDB client MongoClient *mongo.Client //Server addr IpAddr string //Server Port Port string //组合GRPC MetricManage.UnimplementedMetricsServiceServer }
func (*MetricManageImpl) Destroy ¶
func (m *MetricManageImpl) Destroy() error
func (*MetricManageImpl) FetchMetricsForServiceLastSixHour ¶
func (m *MetricManageImpl) FetchMetricsForServiceLastSixHour(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
TODO 取指定服务的6小时内的指标
func (*MetricManageImpl) FetchMetricsForServiceLastTwoHour ¶
func (m *MetricManageImpl) FetchMetricsForServiceLastTwoHour(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
TODO 获取指定服务2小时的指标
func (*MetricManageImpl) FetchMetricsForServiceRecent ¶
func (m *MetricManageImpl) FetchMetricsForServiceRecent(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
TODO 获取指定服务12小时内的指标
func (*MetricManageImpl) FetchServiceMetricsForLastDay ¶
func (m *MetricManageImpl) FetchServiceMetricsForLastDay(ctx context.Context, service *ServiceManage.Service) (*MetricManage.ServiceInstanceMetrics, error)
func (*MetricManageImpl) Init ¶
func (m *MetricManageImpl) Init() error
func (*MetricManageImpl) ReportMetrics ¶
func (m *MetricManageImpl) ReportMetrics(report MetricManage.MetricsService_ReportMetricsServer) error
ReportMetrics(MetricsService_ReportMetricsServer) error
func (*MetricManageImpl) StartServer ¶
func (m *MetricManageImpl) StartServer()
func (*MetricManageImpl) UpdateMetrics ¶
func (m *MetricManageImpl) UpdateMetrics(ctx context.Context, Metrics *MetricManage.MetricsData, id clientv3.LeaseID) error
Click to show internal directories.
Click to hide internal directories.