Documentation ¶
Index ¶
- Variables
- type DefaultService
- func (s *DefaultService) DialURL() string
- func (s *DefaultService) GetMeta() map[string]string
- func (s *DefaultService) GetNamespace() string
- func (s *DefaultService) GetProtocol() string
- func (s *DefaultService) GetTags() []string
- func (s *DefaultService) PublicAddress() string
- func (s *DefaultService) PublicPort() uint16
- func (s *DefaultService) ServiceID() string
- func (s *DefaultService) ServiceName() string
- func (s *DefaultService) String() string
- type Naming
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("service not found")
)
Functions ¶
This section is empty.
Types ¶
type DefaultService ¶
type DefaultService struct { ID string Name string Address string Port uint16 Protocol string Namespace string Tags []string Meta map[string]string }
implementation of qim.Service and qim.ServiceRegistration
func NewEntry ¶
func NewEntry(id, name, protocol, address string, port uint16) *DefaultService
func (*DefaultService) DialURL ¶
func (s *DefaultService) DialURL() string
DialURL implements qim.ServiceRegistration
func (*DefaultService) GetMeta ¶
func (s *DefaultService) GetMeta() map[string]string
GetMeta implements qim.Service
func (*DefaultService) GetNamespace ¶
func (s *DefaultService) GetNamespace() string
GetNamespace implements qim.ServiceRegistration
func (*DefaultService) GetProtocol ¶
func (s *DefaultService) GetProtocol() string
GetProtocol implements qim.ServiceRegistration
func (*DefaultService) GetTags ¶
func (s *DefaultService) GetTags() []string
GetTags implements qim.ServiceRegistration
func (*DefaultService) PublicAddress ¶
func (s *DefaultService) PublicAddress() string
PublicAddress implements qim.ServiceRegistration
func (*DefaultService) PublicPort ¶
func (s *DefaultService) PublicPort() uint16
PublicPort implements qim.ServiceRegistration
func (*DefaultService) ServiceID ¶
func (s *DefaultService) ServiceID() string
ServiceID implements qim.Service
func (*DefaultService) ServiceName ¶
func (s *DefaultService) ServiceName() string
ServiceName implements qim.Service
func (*DefaultService) String ¶
func (s *DefaultService) String() string
String implements qim.ServiceRegistration
type Naming ¶
type Naming interface { Find(serviceName string, tags ...string) ([]qim.ServiceRegistration, error) Subscribe(serviceName string, callback func(services []qim.ServiceRegistration)) error Unsubscribe(serviceName string) error Register(service qim.ServiceRegistration) error Deregister(serviceID string) error }
Click to show internal directories.
Click to hide internal directories.