info

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type MetadataInfo

type MetadataInfo struct {
	App      string `json:"app,omitempty" hessian:"app"`
	Revision string `json:"revision,omitempty" hessian:"revision"`
	Tag      string
	Services map[string]*ServiceInfo `json:"services,omitempty" hessian:"services"`
	// contains filtered or unexported fields
}

MetadataInfo the metadata information of instance

func NewAppMetadataInfo

func NewAppMetadataInfo(app string) *MetadataInfo

func NewMetadataInfo

func NewMetadataInfo(app, tag string) *MetadataInfo

func NewMetadataInfoWithParams

func NewMetadataInfoWithParams(app string, revision string, services map[string]*ServiceInfo) *MetadataInfo

func (*MetadataInfo) AddService

func (info *MetadataInfo) AddService(url *common.URL)

AddService add provider service info to MetadataInfo

func (*MetadataInfo) AddSubscribeURL

func (info *MetadataInfo) AddSubscribeURL(url *common.URL)

AddSubscribeURL client subscribe a service url

func (*MetadataInfo) CalAndGetRevision

func (info *MetadataInfo) CalAndGetRevision() string

CalAndGetRevision is different from Dubbo because golang doesn't support overload so that we should use interface + method name as identifier and ignore the method params in my opinion, it's enough because Dubbo actually ignore the URL params. please refer org.apache.dubbo.common.URL#toParameterString(java.lang.String...)

func (*MetadataInfo) GetExportedServiceURLs

func (info *MetadataInfo) GetExportedServiceURLs() []*common.URL

func (*MetadataInfo) GetSubscribedURLs

func (info *MetadataInfo) GetSubscribedURLs() []*common.URL

func (*MetadataInfo) JavaClassName

func (info *MetadataInfo) JavaClassName() string

func (*MetadataInfo) RemoveService

func (info *MetadataInfo) RemoveService(url *common.URL)

func (*MetadataInfo) RemoveSubscribeURL

func (info *MetadataInfo) RemoveSubscribeURL(url *common.URL)

RemoveSubscribeURL client unsubscribe a service url

type ServiceInfo

type ServiceInfo struct {
	Name     string            `json:"name,omitempty" hessian:"name"`
	Group    string            `json:"group,omitempty" hessian:"group"`
	Version  string            `json:"version,omitempty" hessian:"version"`
	Protocol string            `json:"protocol,omitempty" hessian:"protocol"`
	Port     int               `json:"port,omitempty" hessian:"port"`
	Path     string            `json:"path,omitempty" hessian:"path"`
	Params   map[string]string `json:"params,omitempty" hessian:"params"`

	ServiceKey string      `json:"-" hessian:"-"`
	MatchKey   string      `json:"-" hessian:"-"`
	URL        *common.URL `json:"-" hessian:"-"`
}

ServiceInfo the information of service

func NewServiceInfo

func NewServiceInfo(name, group, version, protocol, path string, params map[string]string) *ServiceInfo

func NewServiceInfoWithURL

func NewServiceInfoWithURL(url *common.URL) *ServiceInfo

func (*ServiceInfo) GetMatchKey

func (si *ServiceInfo) GetMatchKey() string

func (*ServiceInfo) GetMethods

func (si *ServiceInfo) GetMethods() []string

func (*ServiceInfo) GetParams

func (si *ServiceInfo) GetParams() url.Values

func (*ServiceInfo) GetServiceKey

func (si *ServiceInfo) GetServiceKey() string

func (*ServiceInfo) JavaClassName

func (si *ServiceInfo) JavaClassName() string

Jump to

Keyboard shortcuts

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