service

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertURLArrToIntfArr

func ConvertURLArrToIntfArr(urls []*common.URL) []interface{}

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

Version will return the version 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 (*BaseMetadataServiceProxyFactory) GetProxy

type MetadataService

type MetadataService interface {
	common.RPCService
	// 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) ([]interface{}, error)

	MethodMapper() map[string]string

	// GetExportedURLs 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)
	// GetServiceDefinition 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)
}

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
}

Directories

Path Synopsis
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.

Jump to

Keyboard shortcuts

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