Documentation ¶
Index ¶
- Variables
- func NewEntry(id, name, protocol string, address string, port int) kim.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")
)
errors
Functions ¶
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) GetNamespace ¶
func (e *DefaultService) GetNamespace() string
Namespace Namespace
func (*DefaultService) GetProtocol ¶
func (e *DefaultService) GetProtocol() string
Protocol Protocol
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) 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
Click to show internal directories.
Click to hide internal directories.