nsqlookupd

package
v0.2.30 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2014 License: MIT Imports: 16 Imported by: 0

README

nsqlookupd

nsqlookupd is the daemon that manages topology information. Clients query nsqlookupd to discover nsqd producers for a specific topic and nsqd nodes broadcasts topic and channel information.

Read the docs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNSQLookupdOptions added in v0.2.25

func NewNSQLookupdOptions() *nsqlookupdOptions

Types

type ClientV1

type ClientV1 struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewClientV1

func NewClientV1(conn net.Conn) *ClientV1

func (*ClientV1) String

func (c *ClientV1) String() string

type Context added in v0.2.22

type Context struct {
	// contains filtered or unexported fields
}

type LookupProtocolV1

type LookupProtocolV1 struct {
	// contains filtered or unexported fields
}

func (*LookupProtocolV1) Exec

func (p *LookupProtocolV1) Exec(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)

func (*LookupProtocolV1) IDENTIFY

func (p *LookupProtocolV1) IDENTIFY(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)

func (*LookupProtocolV1) IOLoop

func (p *LookupProtocolV1) IOLoop(conn net.Conn) error

func (*LookupProtocolV1) PING

func (p *LookupProtocolV1) PING(client *ClientV1, params []string) ([]byte, error)

func (*LookupProtocolV1) REGISTER

func (p *LookupProtocolV1) REGISTER(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)

func (*LookupProtocolV1) UNREGISTER

func (p *LookupProtocolV1) UNREGISTER(client *ClientV1, reader *bufio.Reader, params []string) ([]byte, error)

type NSQLookupd

type NSQLookupd struct {
	DB *RegistrationDB
	// contains filtered or unexported fields
}

func NewNSQLookupd

func NewNSQLookupd(options *nsqlookupdOptions) *NSQLookupd

func (*NSQLookupd) Exit

func (l *NSQLookupd) Exit()

func (*NSQLookupd) Main

func (l *NSQLookupd) Main()

type PeerInfo added in v0.2.18

type PeerInfo struct {
	RemoteAddress    string `json:"remote_address"`
	Hostname         string `json:"hostname"`
	BroadcastAddress string `json:"broadcast_address"`
	TcpPort          int    `json:"tcp_port"`
	HttpPort         int    `json:"http_port"`
	Version          string `json:"version"`
	// contains filtered or unexported fields
}

type Producer

type Producer struct {
	// contains filtered or unexported fields
}

func (*Producer) IsTombstoned added in v0.2.17

func (p *Producer) IsTombstoned(lifetime time.Duration) bool

func (*Producer) String

func (p *Producer) String() string

func (*Producer) Tombstone added in v0.2.17

func (p *Producer) Tombstone()

type Producers

type Producers []*Producer

func (Producers) FilterByActive added in v0.2.17

func (pp Producers) FilterByActive(inactivityTimeout time.Duration, tombstoneLifetime time.Duration) Producers

func (Producers) PeerInfo added in v0.2.18

func (pp Producers) PeerInfo() []*PeerInfo

type Registration

type Registration struct {
	Category string
	Key      string
	SubKey   string
}

func (Registration) IsMatch

func (k Registration) IsMatch(category string, key string, subkey string) bool

type RegistrationDB

type RegistrationDB struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL