Documentation ¶
Index ¶
Constants ¶
View Source
const (
Timeout = time.Second * 20
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
List []*Ping
}
func NewCollection ¶
func NewCollection() *Collection
func (*Collection) Add ¶
func (c *Collection) Add(p *Ping) error
func (*Collection) AddNew ¶
func (c *Collection) AddNew(publicKey *[crypto.PublicKeySize]byte) (*Ping, error)
func (*Collection) Clear ¶
func (c *Collection) Clear(expiredOnly bool)
func (*Collection) Find ¶
func (c *Collection) Find(publicKey *[crypto.PublicKeySize]byte, pingID uint64, remove bool) *Ping
Find tries to find the given ping ID and public key in the list of pings. If 'remove' is set to true, the entry will also be removed from the list.
Click to show internal directories.
Click to hide internal directories.