set

package
v0.0.0-...-dfaed72 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

Set implements set with memberership expiration.

func NewSet

func NewSet() Set

func (*Set) Deadline

func (s *Set) Deadline() time.Time

Deadline retunrn first deadline

func (*Set) Expire

func (s *Set) Expire() (expired []net.IP)

Expire must be called periodically to purge old entries returns expired entries

func (*Set) Insert

func (s *Set) Insert(netIP net.IP, duration time.Duration) bool

Insert will insert element into set or update duration if element already exists

Jump to

Keyboard shortcuts

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