service

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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