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: 17 Imported by: 0

Documentation

Index

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

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

Jump to

Keyboard shortcuts

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