Documentation ¶
Index ¶
- Constants
- func ResyncPeriod(options registry.Options) func() time.Duration
- type DiscoveryController
- type ServiceDiscovery
- func (r *ServiceDiscovery) AutoSync()
- func (r *ServiceDiscovery) Close() error
- func (r *ServiceDiscovery) FindMicroServiceInstances(consumerID, microServiceName string, tags utiltags.Tags) ([]*registry.MicroServiceInstance, error)
- func (r *ServiceDiscovery) GetAllMicroServices() ([]*registry.MicroService, error)
- func (r *ServiceDiscovery) GetMicroService(microServiceID string) (*registry.MicroService, error)
- func (r *ServiceDiscovery) GetMicroServiceID(appID, microServiceName, version, env string) (string, error)
- func (r *ServiceDiscovery) GetMicroServiceInstances(consumerID, providerID string) ([]*registry.MicroServiceInstance, error)
Constants ¶
View Source
const ( // KubeRegistry constant string KubeRegistry = "kube" // DefaultMinResyncPeriod determins the minmum resync period DefaultMinResyncPeriod = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiscoveryController ¶
type DiscoveryController struct {
// contains filtered or unexported fields
}
DiscoveryController defines discovery controller for kube registry
func NewDiscoveryController ¶
func NewDiscoveryController( sInformer coreinformers.ServiceInformer, eInformer coreinformers.EndpointsInformer, pInformer coreinformers.PodInformer, client kubernetes.Interface, ) *DiscoveryController
NewDiscoveryController returns new discovery controller
func (*DiscoveryController) FindEndpoints ¶
func (dc *DiscoveryController) FindEndpoints(service string, tags utiltags.Tags) ([]*registry.MicroServiceInstance, error)
FindEndpoints returns microservice instances of kube registry
func (*DiscoveryController) GetAllServices ¶
func (dc *DiscoveryController) GetAllServices() ([]*registry.MicroService, error)
GetAllServices returns microservice of kube registry
func (*DiscoveryController) Run ¶
func (dc *DiscoveryController) Run(stop <-chan struct{})
Run begins discovery controller
type ServiceDiscovery ¶
type ServiceDiscovery struct { Controller *DiscoveryController Name string }
ServiceDiscovery to represent the object of service center to call the APIs of service center
func (*ServiceDiscovery) AutoSync ¶
func (r *ServiceDiscovery) AutoSync()
AutoSync updating the cache manager
func (*ServiceDiscovery) Close ¶
func (r *ServiceDiscovery) Close() error
Close close all websocket connection
func (*ServiceDiscovery) FindMicroServiceInstances ¶
func (r *ServiceDiscovery) FindMicroServiceInstances(consumerID, microServiceName string, tags utiltags.Tags) ([]*registry.MicroServiceInstance, error)
FindMicroServiceInstances find micro-service instances
func (*ServiceDiscovery) GetAllMicroServices ¶
func (r *ServiceDiscovery) GetAllMicroServices() ([]*registry.MicroService, error)
GetAllMicroServices Get all MicroService information.
func (*ServiceDiscovery) GetMicroService ¶
func (r *ServiceDiscovery) GetMicroService(microServiceID string) (*registry.MicroService, error)
GetMicroService return service
func (*ServiceDiscovery) GetMicroServiceID ¶
func (r *ServiceDiscovery) GetMicroServiceID(appID, microServiceName, version, env string) (string, error)
GetMicroServiceID get microServiceID
func (*ServiceDiscovery) GetMicroServiceInstances ¶
func (r *ServiceDiscovery) GetMicroServiceInstances(consumerID, providerID string) ([]*registry.MicroServiceInstance, error)
GetMicroServiceInstances return instances
Click to show internal directories.
Click to hide internal directories.