Documentation ¶
Index ¶
- func BuildCacher(t discovery.Type, cfg *discovery.Config, cache discovery.Cache) discovery.Cacher
- func InitConfigs()
- func NewRepository() mgr.Instance
- type Adaptor
- type Cacher
- type ClusterIndexer
- type Repository
- type SCClientAggregate
- func (c *SCClientAggregate) GetInstanceByInstanceID(ctx context.Context, ...) (*discovery.Response, *scerr.Error)
- func (c *SCClientAggregate) GetInstancesByServiceID(ctx context.Context, domain, project, providerID, consumerID string) (*discovery.Response, *scerr.Error)
- func (c *SCClientAggregate) GetScCache(ctx context.Context) (*model.Cache, map[string]error)
- func (c *SCClientAggregate) GetSchemaBySchemaID(ctx context.Context, domainProject, serviceID, schemaID string) (*discovery.Response, *scerr.Error)
- func (c *SCClientAggregate) GetSchemasByServiceID(ctx context.Context, domainProject, serviceID string) (*discovery.Response, *scerr.Error)
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCacher ¶
func InitConfigs ¶
func InitConfigs()
func NewRepository ¶
Types ¶
type Adaptor ¶
Adaptor implements discovery.Adaptor. Adaptor does service discovery with other service-centers as it's registry.
func NewServiceCenterAdaptor ¶
type ClusterIndexer ¶
type ClusterIndexer struct { *discovery.CacheIndexer Client *SCClientAggregate Type discovery.Type }
ClusterIndexer implements discovery.Indexer. ClusterIndexer searches data from cache(firstly) and other service-centers(secondly).
func NewClusterIndexer ¶
func NewClusterIndexer(t discovery.Type, cache discovery.Cache) *ClusterIndexer
func (*ClusterIndexer) Creditable ¶
func (i *ClusterIndexer) Creditable() bool
Creditable implements discovery.Indexer.Creditable. ClusterIndexer's search result's are not creditable as SCClientAggregate ignores sc clients' errors.
func (*ClusterIndexer) Search ¶
func (i *ClusterIndexer) Search(ctx context.Context, opts ...registry.PluginOpOption) (resp *discovery.Response, err error)
type Repository ¶
type Repository struct { }
type SCClientAggregate ¶
func GetOrCreateSCClient ¶
func GetOrCreateSCClient() *SCClientAggregate
func (*SCClientAggregate) GetInstanceByInstanceID ¶
func (*SCClientAggregate) GetInstancesByServiceID ¶
func (*SCClientAggregate) GetScCache ¶
func (*SCClientAggregate) GetSchemaBySchemaID ¶
func (*SCClientAggregate) GetSchemasByServiceID ¶
type Syncer ¶
type Syncer struct { Client *SCClientAggregate // contains filtered or unexported fields }
func GetOrCreateSyncer ¶
func GetOrCreateSyncer() *Syncer
func (*Syncer) Initialize ¶
func (c *Syncer) Initialize()
Click to show internal directories.
Click to hide internal directories.