cache

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache map[string]*Item

type Item

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

func Create

func Create(ip4, ip6 []string, canup bool) *Item

func (*Item) GetIP4

func (o *Item) GetIP4() (v []string)

func (*Item) GetIP6

func (o *Item) GetIP6() (v []string)

func (*Item) HasIP4

func (o *Item) HasIP4() bool

func (*Item) HasIP6

func (o *Item) HasIP6() bool

func (*Item) IsUpdatable

func (o *Item) IsUpdatable() bool

func (*Item) SetIP4

func (o *Item) SetIP4(v ...string)

func (*Item) SetIP6

func (o *Item) SetIP6(v ...string)

func (*Item) SetUpdatable

func (o *Item) SetUpdatable(v bool)

type Repository

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

func New

func New() *Repository

func (*Repository) Del

func (o *Repository) Del(name string)

func (*Repository) Get

func (o *Repository) Get(name string) *Item

func (*Repository) List

func (o *Repository) List(call func(name string, ip []string))

func (*Repository) Set

func (o *Repository) Set(name string, d *Item)

func (*Repository) Update

func (o *Repository) Update(name string, ip4, ip6 []string)

Jump to

Keyboard shortcuts

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