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 ¶
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
Click to show internal directories.
Click to hide internal directories.