vppagent

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTransationHandler

type MockTransationHandler interface {
	// ApplyTxn is called when applying transaction created by Contiv code for VPP-Agent to set up VPP. Data from transaction
	// are used by mock transaction handler, usually for exposing to unit tests for verification purposes.
	ApplyTxn(txn *localclient.Txn, latestRevs *syncbase.PrevRevisions) error
}

MockTransationHandler is API for mocked handlers handling the whole transaction or only part of the transaction. In case of partial handling of transaction, parts of transactions handled create some logical group (i.e. SRv6, Routes, Interfaces,...)

type MockVPPAgent

type MockVPPAgent struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MockVPPAgent mocks vpp agent behaviour related to transaction committing to vpp agent using vpp agent client. MockVPPAgent can register multiple handlers that mock different parts of transaction commit parts (i.e. SRv6, Routes, ...)

func NewMockVPPAgent

func NewMockVPPAgent(handlers ...MockTransationHandler) *MockVPPAgent

func (*MockVPPAgent) ApplyTxn

func (m *MockVPPAgent) ApplyTxn(txn *localclient.Txn, latestRevs *syncbase.PrevRevisions) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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