naming

package
v0.0.0-...-69995ca Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("service no found")
)

errors

Functions

func NewEntry

func NewEntry(id, name, protocol string, address string, port int) kim.ServiceRegistration

NewEntry NewEntry

Types

type DefaultService

type DefaultService struct {
	Id        string
	Name      string
	Address   string
	Port      int
	Protocol  string
	Namespace string
	Tags      []string
	Meta      map[string]string
}

DefaultService Service Impl

func (*DefaultService) DialURL

func (e *DefaultService) DialURL() string

func (*DefaultService) GetMeta

func (e *DefaultService) GetMeta() map[string]string

Meta Meta

func (*DefaultService) GetNamespace

func (e *DefaultService) GetNamespace() string

Namespace Namespace

func (*DefaultService) GetProtocol

func (e *DefaultService) GetProtocol() string

Protocol Protocol

func (*DefaultService) GetTags

func (e *DefaultService) GetTags() []string

Tags Tags

func (*DefaultService) PublicAddress

func (e *DefaultService) PublicAddress() string

Address Address

func (*DefaultService) PublicPort

func (e *DefaultService) PublicPort() int

func (*DefaultService) ServiceID

func (e *DefaultService) ServiceID() string

ID returns the ServiceImpl ID

func (*DefaultService) ServiceName

func (e *DefaultService) ServiceName() string

Name Name

func (*DefaultService) String

func (e *DefaultService) String() string

type Naming

type Naming interface {
	Find(serviceName string, tags ...string) ([]kim.ServiceRegistration, error)
	Subscribe(serviceName string, callback func(services []kim.ServiceRegistration)) error
	Unsubscribe(serviceName string) error
	Register(service kim.ServiceRegistration) error
	Deregister(serviceID string) error
}

Naming defined methods of the naming service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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