Documentation ¶
Index ¶
- Constants
- func Load(projectRoot string) error
- type EtcdValue
- type MetricManageSvc
- type MongoConf
- type RedisConf
- type ServiceBuilder
- type ServiceUtils
- type ServiceUtilsImpl
- func (s *ServiceUtilsImpl) Close()
- func (s *ServiceUtilsImpl) FetchOptimalServiceMetricsForPrefix(ctx context.Context, ProjectName, ServiceName string) (*MetricManage.ServiceInstance, error)
- func (s *ServiceUtilsImpl) RegisterService(ctx context.Context, service *ServiceManage.Service) error
- func (s *ServiceUtilsImpl) RenewService(ctx context.Context, leaseId clientv3.LeaseID)
- func (s *ServiceUtilsImpl) ResolveNow(opts resolver.ResolveNowOptions)
- func (s *ServiceUtilsImpl) UnRegisterService(cancelFunc context.CancelFunc, ServiceUnRegister *redis.PubSub, ...)
Constants ¶
View Source
const Scheme = "wcenter"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EtcdValue ¶
type EtcdValue struct { Op int `json:"Op"` Addr string `json:"Addr"` Metadata *MetricManage.MetricsData `json:"Metadata"` }
type MetricManageSvc ¶
type ServiceBuilder ¶
type ServiceBuilder struct{}
func (*ServiceBuilder) Build ¶
func (*ServiceBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
func (*ServiceBuilder) Scheme ¶
func (*ServiceBuilder) Scheme() string
type ServiceUtils ¶
type ServiceUtilsImpl ¶
type ServiceUtilsImpl struct { MetricMonitor MetricMonitor.MetricMonitor EtcdClient *clientv3.Client RedisClient *redis.Client MongoClient *mongo.Client // contains filtered or unexported fields }
func NewServiceUtils ¶
func NewServiceUtils() (*ServiceUtilsImpl, error)
func (*ServiceUtilsImpl) Close ¶
func (s *ServiceUtilsImpl) Close()
func (*ServiceUtilsImpl) FetchOptimalServiceMetricsForPrefix ¶
func (s *ServiceUtilsImpl) FetchOptimalServiceMetricsForPrefix(ctx context.Context, ProjectName, ServiceName string) (*MetricManage.ServiceInstance, error)
func (*ServiceUtilsImpl) RegisterService ¶
func (s *ServiceUtilsImpl) RegisterService(ctx context.Context, service *ServiceManage.Service) error
TODO implement 用户调用 服务注册
func (*ServiceUtilsImpl) RenewService ¶
func (s *ServiceUtilsImpl) RenewService(ctx context.Context, leaseId clientv3.LeaseID)
TODO implement 用户调用 服务续约 TODO implement 使用消息队列订阅服务注销的主题,监听到后应不再续约
func (*ServiceUtilsImpl) ResolveNow ¶
func (s *ServiceUtilsImpl) ResolveNow(opts resolver.ResolveNowOptions)
func (*ServiceUtilsImpl) UnRegisterService ¶
func (s *ServiceUtilsImpl) UnRegisterService(cancelFunc context.CancelFunc, ServiceUnRegister *redis.PubSub, service *ServiceManage.Service)
Click to show internal directories.
Click to hide internal directories.