naming

package
v0.0.0-...-c0a7596 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func NewEntry

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

Types

type DefaultService

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

func (*DefaultService) DialURL

func (e *DefaultService) DialURL() string

func (*DefaultService) GetMeta

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

func (*DefaultService) GetNamespace

func (e *DefaultService) GetNamespace() string

func (*DefaultService) GetProtocol

func (e *DefaultService) GetProtocol() string

func (*DefaultService) GetTags

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

func (*DefaultService) PublicAddress

func (e *DefaultService) PublicAddress() string

func (*DefaultService) PublicPort

func (e *DefaultService) PublicPort() int

func (*DefaultService) ServiceID

func (e *DefaultService) ServiceID() string

func (*DefaultService) ServiceName

func (e *DefaultService) ServiceName() string

func (*DefaultService) String

func (e *DefaultService) String() string

type Naming

type Naming interface {
	Find(serviceName string, tags ...string) ([]goim.ServiceRegistration, error)
	Subscribe(serviceName string, callback func(services []goim.ServiceRegistration)) error
	Unsubscribe(serviceName string) error
	Register(service goim.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