Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertURLArrToIntfArr ¶
Types ¶
type BaseMetadataService ¶
type BaseMetadataService struct {
// contains filtered or unexported fields
}
BaseMetadataService is used for the event logic for struct who will implement interface MetadataService
func NewBaseMetadataService ¶
func NewBaseMetadataService(serviceName string) BaseMetadataService
func (*BaseMetadataService) MethodMapper ¶
func (mts *BaseMetadataService) MethodMapper() map[string]string
func (*BaseMetadataService) Reference ¶
func (mts *BaseMetadataService) Reference() string
Reference will return the reference id of metadata service
func (*BaseMetadataService) ServiceName ¶
func (mts *BaseMetadataService) ServiceName() (string, error)
ServiceName can get the service's name in meta service , which is application name
type BaseMetadataServiceProxyFactory ¶
type BaseMetadataServiceProxyFactory struct {
// contains filtered or unexported fields
}
func NewBaseMetadataServiceProxyFactory ¶
func NewBaseMetadataServiceProxyFactory(creator MetadataServiceProxyCreator) *BaseMetadataServiceProxyFactory
func (*BaseMetadataServiceProxyFactory) GetProxy ¶
func (b *BaseMetadataServiceProxyFactory) GetProxy(ins registry.ServiceInstance) MetadataService
type MetadataService ¶
type MetadataService interface {
common.ReferencedRPCService
// ServiceName will get the service's name in meta service , which is application name
ServiceName() (string, error)
// ExportURL will store the exported url in metadata
ExportURL(url *common.URL) (bool, error)
// UnexportURL will delete the exported url in metadata
UnexportURL(url *common.URL) error
// SubscribeURL will store the subscribed url in metadata
SubscribeURL(url *common.URL) (bool, error)
// UnsubscribeURL will delete the subscribed url in metadata
UnsubscribeURL(url *common.URL) error
// PublishServiceDefinition will generate the target url's code info
PublishServiceDefinition(url *common.URL) error
// GetExportedURLs will get the target exported url in metadata
// the url should be unique
// due to dubbo-go only support return array []interface{} in RPCService, so we should declare the return type as []interface{}
// actually, it's []String
GetExportedURLs(serviceInterface string, group string, version string, protocol string) ([]*common.URL, error)
// MethodMapper for rename dubbo method name
MethodMapper() map[string]string
// GetSubscribedURLs will get the target subscribed url in metadata the url should be unique
GetSubscribedURLs() ([]*common.URL, error)
// GetServiceDefinition will get the target service info store in metadata
GetServiceDefinition(interfaceName string, group string, version string) (string, error)
// GetServiceDefinitionByServiceKey will get the target service info store in metadata by service key
GetServiceDefinitionByServiceKey(serviceKey string) (string, error)
// RefreshMetadata will refresh the metadata
RefreshMetadata(exportedRevision string, subscribedRevision string) (bool, error)
// Version will return the metadata service version
Version() (string, error)
// GetMetadataInfo will return metadata info
GetMetadataInfo(revision string) (*common.MetadataInfo, error)
// GetExportedServiceURLs will return exported service urls
GetExportedServiceURLs() ([]*common.URL, error)
// GetMetadataServiceURL will return the url of metadata service
GetMetadataServiceURL() (*common.URL, error)
// SetMetadataServiceURL will save the url of metadata service
SetMetadataServiceURL(*common.URL) error
}
MetadataService is used to define meta data related behaviors usually the implementation should be singleton
type MetadataServiceProxyCreator ¶
type MetadataServiceProxyCreator func(ins registry.ServiceInstance) MetadataService
type MetadataServiceProxyFactory ¶
type MetadataServiceProxyFactory interface {
GetProxy(ins registry.ServiceInstance) MetadataService
}
type RemoteMetadataService ¶
type RemoteMetadataService interface {
// PublishMetadata publish the medata info of service from report
PublishMetadata(service string)
// GetMetadata get the medata info of service from report
GetMetadata(instance registry.ServiceInstance) (*common.MetadataInfo, error)
// PublishServiceDefinition will call remote metadata's StoreProviderMetadata to store url info and service definition
PublishServiceDefinition(url *common.URL) error
}
Click to show internal directories.
Click to hide internal directories.