testing

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeIPSet

type FakeIPSet struct {
	// version of ipset util
	Version string
	// The key of Sets map is the ip set name
	Sets map[string]*ipset.IPSet
	// The key of Entries map is the ip set name where the entries exists
	Entries map[string]sets.String
}

FakeIPSet is a no-op implementation of ipset Interface

func NewFake

func NewFake(version string) *FakeIPSet

NewFake create a new fake ipset interface - it initialize the FakeIPSet.

func (*FakeIPSet) AddEntry

func (f *FakeIPSet) AddEntry(entry string, set *ipset.IPSet, ignoreExistErr bool) error

AddEntry is part of interface.

func (*FakeIPSet) CreateSet

func (f *FakeIPSet) CreateSet(set *ipset.IPSet, ignoreExistErr bool) error

CreateSet is part of interface.

func (*FakeIPSet) DelEntry

func (f *FakeIPSet) DelEntry(entry string, set string) error

DelEntry is part of interface.

func (*FakeIPSet) DestroyAllSets

func (f *FakeIPSet) DestroyAllSets() error

DestroyAllSets is part of interface.

func (*FakeIPSet) DestroySet

func (f *FakeIPSet) DestroySet(set string) error

DestroySet is part of interface. It deletes both the entries and the set itself.

func (*FakeIPSet) FlushSet

func (f *FakeIPSet) FlushSet(set string) error

FlushSet is part of interface. It deletes all entries from a named set but keeps the set itself.

func (*FakeIPSet) GetVersion

func (f *FakeIPSet) GetVersion() (string, error)

GetVersion is part of interface.

func (*FakeIPSet) ListEntries

func (f *FakeIPSet) ListEntries(set string) ([]string, error)

ListEntries is part of interface.

func (*FakeIPSet) ListSets

func (f *FakeIPSet) ListSets() ([]string, error)

ListSets is part of interface.

func (*FakeIPSet) TestEntry

func (f *FakeIPSet) TestEntry(entry string, set string) (bool, error)

TestEntry is part of interface.

Jump to

Keyboard shortcuts

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