Documentation ¶
Index ¶
- type MultiAddrStore
- func (multiStore *MultiAddrStore) AddrsAll() ([]wire.Address, error)
- func (multiStore *MultiAddrStore) BootstrapAll() ([]wire.Address, error)
- func (multiStore *MultiAddrStore) Delete(addr wire.Address) error
- func (multiStore *MultiAddrStore) Get(id string) (wire.Address, error)
- func (multiStore *MultiAddrStore) Insert(addr wire.Address) error
- func (multiStore *MultiAddrStore) RandomAddrs(n int) ([]wire.Address, error)
- func (multiStore *MultiAddrStore) RandomBootstrapAddrs(n int) ([]wire.Address, error)
- func (multiStore *MultiAddrStore) Size() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiAddrStore ¶
type MultiAddrStore struct {
// contains filtered or unexported fields
}
MultiAddrStore is a store of `wire.Address`es.
func New ¶
func New(store db.Table, bootstrapAddrs []wire.Address) MultiAddrStore
New constructs a new `MultiAddrStore`.
func (*MultiAddrStore) AddrsAll ¶
func (multiStore *MultiAddrStore) AddrsAll() ([]wire.Address, error)
AddrsAll returns all of the multi-addresses in the store.
func (*MultiAddrStore) BootstrapAll ¶
func (multiStore *MultiAddrStore) BootstrapAll() ([]wire.Address, error)
BootstrapAll returns the multi-addresses of all of the Bootstrap nodes.
func (*MultiAddrStore) Delete ¶
func (multiStore *MultiAddrStore) Delete(addr wire.Address) error
Delete removes the given multi-address from the store.
func (*MultiAddrStore) Get ¶
func (multiStore *MultiAddrStore) Get(id string) (wire.Address, error)
Get retrieves a multi-address from the store.
func (*MultiAddrStore) Insert ¶
func (multiStore *MultiAddrStore) Insert(addr wire.Address) error
Insert puts the given multi-address into the store.
func (*MultiAddrStore) RandomAddrs ¶
func (multiStore *MultiAddrStore) RandomAddrs(n int) ([]wire.Address, error)
RandomAddrs returns a random number of multi-addresses in the store.
func (*MultiAddrStore) RandomBootstrapAddrs ¶
func (multiStore *MultiAddrStore) RandomBootstrapAddrs(n int) ([]wire.Address, error)
RandomBootstrapAddrs returns a random number of Bootstrap multi-addresses in the store.
func (*MultiAddrStore) Size ¶
func (multiStore *MultiAddrStore) Size() (int, error)
Size returns the number of entries in the store.
Click to show internal directories.
Click to hide internal directories.