sessionrules

package
v1.4.2-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: Apache-2.0 Imports: 12 Imported by: ? 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 GlobalTableCheck

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

LocalTableCheck allows to check the content of the global table.

func (*GlobalTableCheck) HasRule

func (gtc *GlobalTableCheck) HasRule(lclIP string, lclPort uint16, rmtIP string, rmtPort uint16, proto string, action string) bool

HasRule returns <true> if the given rule is present in the table.

func (*GlobalTableCheck) NumOfRules

func (gtc *GlobalTableCheck) NumOfRules() int

NumOfRules returns the number of rules in the table.

type LocalTableCheck

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

LocalTableCheck allows to check the content of a local table.

func (*LocalTableCheck) HasRule

func (ltc *LocalTableCheck) HasRule(lclIP string, lclPort uint16, rmtIP string, rmtPort uint16, proto string, action string) bool

HasRule returns <true> if the given rule is present in the table.

func (*LocalTableCheck) NumOfRules

func (ltc *LocalTableCheck) NumOfRules() int

NumOfRules returns the number of rules in the table.

type MockSessionRules

type MockSessionRules struct {
	Log logging.Logger
	// contains filtered or unexported fields
}

MockSessionRules simulates session rules from VPPTCP stack. The installed rules are only stored locally and can be queried for testing purposes.

func NewMockSessionRules

func NewMockSessionRules(log logging.Logger, tagPrefix string) *MockSessionRules

NewMockSessionRules is a constructor for MockSessionRules. Create only one in the entire test suite. Clear state between tests using the Clear() method.

func (*MockSessionRules) Clear

func (msr *MockSessionRules) Clear()

Clear clears the state of the mocked session.

func (*MockSessionRules) GetErrCount

func (msr *MockSessionRules) GetErrCount() int

GetErrCount returns the number of errors that have occurred so far.

func (*MockSessionRules) GetReqCount

func (msr *MockSessionRules) GetReqCount() int

GetReqCount returns the number of requests that have been received so far.

func (*MockSessionRules) GlobalTable

func (msr *MockSessionRules) GlobalTable() *GlobalTableCheck

GlobalTable allows to access checks for the global table.

func (*MockSessionRules) LocalTable

func (msr *MockSessionRules) LocalTable(nsIndex uint32) *LocalTableCheck

LocalTable allows to access checks for a local table.

func (*MockSessionRules) NewVPPChan

func (msr *MockSessionRules) NewVPPChan() govppapi.Channel

NewVPPChan creates a new mock VPP channel.

type SessionRules

type SessionRules []*vpptcprule.SessionRule

SessionRules is a list of session rules.

Source Files

  • sessionrules_mock.go

Jump to

Keyboard shortcuts

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