local

package
v3.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInMemoryMetadataServiceProxyFactory

func GetInMemoryMetadataServiceProxyFactory() service.MetadataServiceProxyFactory

func GetLocalMetadataService

func GetLocalMetadataService() (service.MetadataService, error)

GetLocalMetadataService which should be singleton initiates a metadata service

Types

type MetadataService

type MetadataService struct {
	service.BaseMetadataService
	// contains filtered or unexported fields
}

MetadataService is store and query the metadata info in memory when each service registry

func (*MetadataService) ExportURL

func (mts *MetadataService) ExportURL(url *common.URL) (bool, error)

ExportURL can store the in memory

func (*MetadataService) GetExportedServiceURLs

func (mts *MetadataService) GetExportedServiceURLs() ([]*common.URL, error)

GetExportedServiceURLs get exported service urls

func (*MetadataService) GetExportedURLs

func (mts *MetadataService) GetExportedURLs(serviceInterface string, group string, version string, protocol string) ([]*common.URL, error)

GetExportedURLs get all exported urls

func (*MetadataService) GetMetadataInfo

func (mts *MetadataService) GetMetadataInfo(revision string) (*common.MetadataInfo, error)

GetMetadataInfo can get metadata in memory

func (*MetadataService) GetMetadataServiceURL

func (mts *MetadataService) GetMetadataServiceURL() (*common.URL, error)

GetMetadataServiceURL get url of MetadataService

func (*MetadataService) GetServiceDefinition

func (mts *MetadataService) GetServiceDefinition(interfaceName string, group string, version string) (string, error)

GetServiceDefinition can get service definition by interfaceName, group and version

func (*MetadataService) GetServiceDefinitionByServiceKey

func (mts *MetadataService) GetServiceDefinitionByServiceKey(serviceKey string) (string, error)

GetServiceDefinitionByServiceKey can get service definition by serviceKey

func (*MetadataService) GetSubscribedURLs

func (mts *MetadataService) GetSubscribedURLs() ([]*common.URL, error)

GetSubscribedURLs get all subscribedUrl

func (*MetadataService) PublishServiceDefinition

func (mts *MetadataService) PublishServiceDefinition(url *common.URL) error

PublishServiceDefinition publish url's service metadata info, and write into memory

func (*MetadataService) RefreshMetadata

func (mts *MetadataService) RefreshMetadata(string, string) (bool, error)

RefreshMetadata will always return true because it will be implement by remote service

func (*MetadataService) SetMetadataServiceURL

func (mts *MetadataService) SetMetadataServiceURL(url *common.URL) error

SetMetadataServiceURL save url of MetadataService

func (*MetadataService) SubscribeURL

func (mts *MetadataService) SubscribeURL(url *common.URL) (bool, error)

SubscribeURL can store the in memory

func (*MetadataService) UnexportURL

func (mts *MetadataService) UnexportURL(url *common.URL) error

UnexportURL can remove the url store in memory

func (*MetadataService) UnsubscribeURL

func (mts *MetadataService) UnsubscribeURL(url *common.URL) error

UnsubscribeURL can remove the url store in memory

func (*MetadataService) Version

func (mts *MetadataService) Version() (string, error)

Version will return the version of metadata service

type MetadataServiceProxy

type MetadataServiceProxy struct {
	// contains filtered or unexported fields
}

MetadataServiceProxy actually is a RPC stub which will only be used by client-side. If the metadata service is "local" metadata service in server side, which means that metadata service is RPC service too. So in client-side, if we want to get the metadata information, we must call metadata service .This is the stub, or proxy for now, only GetMetadataInfo need to be implemented. TODO use ProxyFactory to create proxy

func (*MetadataServiceProxy) ExportURL

func (m *MetadataServiceProxy) ExportURL(url *common.URL) (bool, error)

nolint

func (*MetadataServiceProxy) GetExportedServiceURLs

func (m *MetadataServiceProxy) GetExportedServiceURLs() ([]*common.URL, error)

nolint

func (*MetadataServiceProxy) GetExportedURLs

func (m *MetadataServiceProxy) GetExportedURLs(serviceInterface string, group string, version string, protocol string) ([]*common.URL, error)

nolint

func (*MetadataServiceProxy) GetMetadataInfo

func (m *MetadataServiceProxy) GetMetadataInfo(revision string) (*common.MetadataInfo, error)

nolint

func (*MetadataServiceProxy) GetMetadataServiceURL

func (m *MetadataServiceProxy) GetMetadataServiceURL() (*common.URL, error)

nolint

func (*MetadataServiceProxy) GetServiceDefinition

func (m *MetadataServiceProxy) GetServiceDefinition(interfaceName string, group string, version string) (string, error)

nolint

func (*MetadataServiceProxy) GetServiceDefinitionByServiceKey

func (m *MetadataServiceProxy) GetServiceDefinitionByServiceKey(serviceKey string) (string, error)

nolint

func (*MetadataServiceProxy) GetSubscribedURLs

func (m *MetadataServiceProxy) GetSubscribedURLs() ([]*common.URL, error)

nolint

func (*MetadataServiceProxy) MethodMapper

func (m *MetadataServiceProxy) MethodMapper() map[string]string

nolint

func (*MetadataServiceProxy) PublishServiceDefinition

func (m *MetadataServiceProxy) PublishServiceDefinition(url *common.URL) error

nolint

func (*MetadataServiceProxy) Reference

func (m *MetadataServiceProxy) Reference() string

nolint

func (*MetadataServiceProxy) RefreshMetadata

func (m *MetadataServiceProxy) RefreshMetadata(exportedRevision string, subscribedRevision string) (bool, error)

nolint

func (*MetadataServiceProxy) ServiceName

func (m *MetadataServiceProxy) ServiceName() (string, error)

nolint

func (*MetadataServiceProxy) SetMetadataServiceURL

func (m *MetadataServiceProxy) SetMetadataServiceURL(*common.URL) error

nolint

func (*MetadataServiceProxy) SubscribeURL

func (m *MetadataServiceProxy) SubscribeURL(url *common.URL) (bool, error)

nolint

func (*MetadataServiceProxy) UnexportURL

func (m *MetadataServiceProxy) UnexportURL(url *common.URL) error

nolint

func (*MetadataServiceProxy) UnsubscribeURL

func (m *MetadataServiceProxy) UnsubscribeURL(url *common.URL) error

nolint

func (*MetadataServiceProxy) Version

func (m *MetadataServiceProxy) Version() (string, error)

nolint

Jump to

Keyboard shortcuts

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