Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressStore ¶
type AddressStore interface {
// ProcessAddress takes a domain id (of peer connections) and returns all addresses registered to that id except addr.
// Furthermore, this method associates addr to id.
// All occurrences of addr should be removed in the returned slice, i.e. the return slice should not contain addr.
// An empty return slice is not an error case. A non-existent identifier should return an empty slice.
//
// This method should be safe for concurrent use.
//
// ProcessAddress deletes addr from domain id after timeout if timeout is non-negative. If timeout is negative,
// nothing should be deleted.
ProcessAddress(id string, addr string, timeout time.Duration) ([]string, error)
// FetchAllAddresses returns all addresses currently in the address store as []string or an error.
// This method must be safe for concurrent use with AddressStore.ProcessAddress.
FetchAllAddresses() ([]string, error)
}
AddressStore stores addresses with domain ids and allows to process those. AddressStore must be safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.