Documentation ¶
Index ¶
- type ClientV1
- type Context
- type LookupProtocolV1
- func (p *LookupProtocolV1) Exec(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)
- func (p *LookupProtocolV1) IDENTIFY(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)
- func (p *LookupProtocolV1) IOLoop(conn net.Conn) error
- func (p *LookupProtocolV1) PING(client *ClientV1, params []string) ([]byte, error)
- func (p *LookupProtocolV1) REGISTER(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)
- func (p *LookupProtocolV1) UNREGISTER(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)
- type NSQLookupd
- type Options
- type PeerInfo
- type Producer
- type Producers
- type Registration
- type RegistrationDB
- func (r *RegistrationDB) AddProducer(k Registration, p *Producer) bool
- func (r *RegistrationDB) AddRegistration(k Registration)
- func (r *RegistrationDB) FindProducers(category string, key string, subkey string) Producers
- func (r *RegistrationDB) FindRegistrations(category string, key string, subkey string) Registrations
- func (r *RegistrationDB) LookupRegistrations(id string) Registrations
- func (r *RegistrationDB) RemoveProducer(k Registration, id string) (bool, int)
- func (r *RegistrationDB) RemoveRegistration(k Registration)
- type Registrations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientV1 ¶
func NewClientV1 ¶
type LookupProtocolV1 ¶
type LookupProtocolV1 struct {
// contains filtered or unexported fields
}
func (*LookupProtocolV1) PING ¶
func (p *LookupProtocolV1) PING(client *ClientV1, params []string) ([]byte, error)
func (*LookupProtocolV1) UNREGISTER ¶
type NSQLookupd ¶
type NSQLookupd struct { sync.RWMutex DB *RegistrationDB // contains filtered or unexported fields }
func New ¶ added in v0.3.6
func New(opts *Options) *NSQLookupd
func (*NSQLookupd) Exit ¶
func (l *NSQLookupd) Exit()
func (*NSQLookupd) Main ¶
func (l *NSQLookupd) Main()
func (*NSQLookupd) RealHTTPAddr ¶ added in v0.3.3
func (l *NSQLookupd) RealHTTPAddr() *net.TCPAddr
func (*NSQLookupd) RealTCPAddr ¶ added in v0.3.3
func (l *NSQLookupd) RealTCPAddr() *net.TCPAddr
type Options ¶ added in v0.3.6
type Options struct { Verbose bool `flag:"verbose"` TCPAddress string `flag:"tcp-address"` HTTPAddress string `flag:"http-address"` BroadcastAddress string `flag:"broadcast-address"` InactiveProducerTimeout time.Duration `flag:"inactive-producer-timeout"` TombstoneLifetime time.Duration `flag:"tombstone-lifetime"` Logger logger }
func NewOptions ¶ added in v0.3.6
func NewOptions() *Options
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
func (*Producer) IsTombstoned ¶ added in v0.2.17
type Registration ¶
type RegistrationDB ¶
func NewRegistrationDB ¶
func NewRegistrationDB() *RegistrationDB
func (*RegistrationDB) AddProducer ¶ added in v0.2.17
func (r *RegistrationDB) AddProducer(k Registration, p *Producer) bool
add a producer to a registration
func (*RegistrationDB) AddRegistration ¶ added in v0.2.16
func (r *RegistrationDB) AddRegistration(k Registration)
add a registration key
func (*RegistrationDB) FindProducers ¶
func (r *RegistrationDB) FindProducers(category string, key string, subkey string) Producers
func (*RegistrationDB) FindRegistrations ¶
func (r *RegistrationDB) FindRegistrations(category string, key string, subkey string) Registrations
func (*RegistrationDB) LookupRegistrations ¶
func (r *RegistrationDB) LookupRegistrations(id string) Registrations
func (*RegistrationDB) RemoveProducer ¶ added in v0.2.17
func (r *RegistrationDB) RemoveProducer(k Registration, id string) (bool, int)
remove a producer from a registration
func (*RegistrationDB) RemoveRegistration ¶
func (r *RegistrationDB) RemoveRegistration(k Registration)
remove a Registration and all it's producers
type Registrations ¶
type Registrations []Registration
func (Registrations) Filter ¶
func (rr Registrations) Filter(category string, key string, subkey string) Registrations
func (Registrations) Keys ¶
func (rr Registrations) Keys() []string
func (Registrations) SubKeys ¶
func (rr Registrations) SubKeys() []string
Click to show internal directories.
Click to hide internal directories.