Documentation
¶
Index ¶
- Variables
- func NewEntry(id, name, protocol string, address string, port int) goim.ServiceRegistration
- type DefaultService
- func (e *DefaultService) DialURL() string
- func (e *DefaultService) GetMeta() map[string]string
- func (e *DefaultService) GetNamespace() string
- func (e *DefaultService) GetProtocol() string
- func (e *DefaultService) GetTags() []string
- func (e *DefaultService) PublicAddress() string
- func (e *DefaultService) PublicPort() int
- func (e *DefaultService) ServiceID() string
- func (e *DefaultService) ServiceName() string
- func (e *DefaultService) String() string
- type Naming
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("service no found")
)
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.