handler

package
v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 9 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 InterfaceMockHandler

type InterfaceMockHandler struct {
	Interfaces map[string]*linux_interfaces.Interface
	// contains filtered or unexported fields
}

InterfaceMockHandler mocks VPP-Agent for Interface configuration part. It remembers Interfaces as VPP-Agent would do and exposes it later for unit test for verification.

func NewInterfaceMock

func NewInterfaceMock(log logging.Logger) *InterfaceMockHandler

NewInterfaceMock creates new InterfaceMockHandler

func (*InterfaceMockHandler) ApplyTxn

func (h *InterfaceMockHandler) ApplyTxn(txn *localclient.Txn, latestRevs *syncbase.PrevRevisions) error

ApplyTxn is called when applying transaction created by Contiv code for VPP-Agent to set up VPP. Interface data from transaction are further stored (mocking VPP-Agent) and later exposed by other methods/fields to i.e. unit tests for verification purposes.

type RouteMockHandler

type RouteMockHandler struct {
	Route map[string]*vpp_l3.Route
	// contains filtered or unexported fields
}

RouteMockHandler mocks VPP-Agent for L3 Route configuration part. It remembers L3 Route as VPP-Agent would do and exposes it later for unit test for verification.

func NewRouteMock

func NewRouteMock(log logging.Logger) *RouteMockHandler

NewRouteMock creates new RouteMockHandler

func (*RouteMockHandler) ApplyTxn

func (h *RouteMockHandler) ApplyTxn(txn *localclient.Txn, latestRevs *syncbase.PrevRevisions) error

ApplyTxn is called when applying transaction created by Contiv code for VPP-Agent to set up VPP. Route data from transaction are further stored (mocking VPP-Agent) and later exposed by other methods/fields to i.e. unit tests for verification purposes.

type RuleChainMockHandler

type RuleChainMockHandler struct {
	RuleChains map[string]*linux_iptables.RuleChain
	// contains filtered or unexported fields
}

RuleChainMockHandler mocks VPP-Agent for RuleChain configuration part. It remembers RuleChains as VPP-Agent would do and exposes it later for unit test for verification.

func NewRuleChainMock

func NewRuleChainMock(log logging.Logger) *RuleChainMockHandler

NewRuleChainMock creates new RuleChainMockHandler

func (*RuleChainMockHandler) ApplyTxn

func (h *RuleChainMockHandler) ApplyTxn(txn *localclient.Txn, latestRevs *syncbase.PrevRevisions) error

ApplyTxn is called when applying transaction created by Contiv code for VPP-Agent to set up VPP. RuleChains data from transaction are further stored (mocking VPP-Agent) and later exposed by other methods/fields to i.e. unit tests for verification purposes.

type SRv6MockHandler

type SRv6MockHandler struct {
	LocalSids map[string]*vpp_srv6.LocalSID
	Policies  map[string]*vpp_srv6.Policy
	Steerings map[string]*vpp_srv6.Steering
	// contains filtered or unexported fields
}

SRv6MockHandler mocks VPP-Agent for SRv6 configuration part. It remembers SRv6 configuration as VPP-Agent would do and exposes it later for unit test for verification.

func NewSRv6Mock

func NewSRv6Mock(log logging.Logger) *SRv6MockHandler

NewSRv6Mock creates new SRv6MockHandler

func (*SRv6MockHandler) ApplyTxn

func (h *SRv6MockHandler) ApplyTxn(txn *localclient.Txn, latestRevs *syncbase.PrevRevisions) error

ApplyTxn is called when applying transaction created by Contiv code for VPP-Agent to set up VPP. SRv6 data from transaction are further stored (mocking VPP-Agent) and later exposed by other methods/fields to i.e. unit tests for verification purposes.

Jump to

Keyboard shortcuts

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