store

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Megabyte = 1 << 20

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	DB *leveldb.DB
}

Store is a storage for ip based wildcard removal

func New

func New(dbPath string) (*Store, error)

New creates a new storage for ip based wildcard removal

func (*Store) Append added in v1.2.0

func (s *Store) Append(ip string, hostnames ...string) error

func (*Store) Close

func (s *Store) Close()

func (*Store) Delete

func (s *Store) Delete(ip string) error

Delete deletes the records for an IP from store.

func (*Store) Exists

func (s *Store) Exists(ip string) bool

Exists indicates if an IP exists in the map

func (*Store) GetHostnames

func (s *Store) GetHostnames(ip string) string

Get gets the meta-information for an IP address from the map.

func (*Store) Iterate

func (s *Store) Iterate(f func(ip string, hostnames []string, counter int))

func (*Store) New

func (s *Store) New(ip, hostname string) error

New creates a new ip-hostname pair in the map

Jump to

Keyboard shortcuts

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