Documentation
¶
Index ¶
- type IpamCacheStub
- func (s *IpamCacheStub) AddPrefixIPPool(prefix *net.IPNet, ipPool *proto.IPAMPoolUpdate)
- func (s *IpamCacheStub) GetPrefixIPPool(prefix *net.IPNet) *proto.IPAMPool
- func (s *IpamCacheStub) IPNetNeedsSNAT(prefix *net.IPNet) bool
- func (s *IpamCacheStub) SyncIPAM(t *tomb.Tomb) error
- func (s *IpamCacheStub) WaitReady()
- type PubSubHandlerMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IpamCacheStub ¶
type IpamCacheStub struct {
// contains filtered or unexported fields
}
IpamCacheStub is stub implementation of watchers.IpamCache.
func NewIpamCacheStub ¶
func NewIpamCacheStub() *IpamCacheStub
NewIpamCacheStub creates new IpamCacheStub instance
func (*IpamCacheStub) AddPrefixIPPool ¶
func (s *IpamCacheStub) AddPrefixIPPool(prefix *net.IPNet, ipPool *proto.IPAMPoolUpdate)
func (*IpamCacheStub) GetPrefixIPPool ¶
func (s *IpamCacheStub) GetPrefixIPPool(prefix *net.IPNet) *proto.IPAMPool
GetPrefixIPPool returns cached IPPools for given prefixes for testing purposes. If no such IPPool exists, it is created. This function never runs out of IPPools
func (*IpamCacheStub) IPNetNeedsSNAT ¶
func (s *IpamCacheStub) IPNetNeedsSNAT(prefix *net.IPNet) bool
func (*IpamCacheStub) SyncIPAM ¶
func (s *IpamCacheStub) SyncIPAM(t *tomb.Tomb) error
func (*IpamCacheStub) WaitReady ¶
func (s *IpamCacheStub) WaitReady()
type PubSubHandlerMock ¶
type PubSubHandlerMock struct { ReceivedEvents []common.CalicoVppEvent // contains filtered or unexported fields }
PubSubHandlerMock is mocking the handlers registering to common.ThePubSub
func NewPubSubHandlerMock ¶
func NewPubSubHandlerMock(expectedEventTypes ...common.CalicoVppEventType) *PubSubHandlerMock
NewPubSubHandlerMock creates new instance of PubSubHandlerMock
func (*PubSubHandlerMock) Start ¶
func (m *PubSubHandlerMock) Start()
Start register this handler to common.ThePubSub and starts its handling loop in another go routing
func (*PubSubHandlerMock) Stop ¶
func (m *PubSubHandlerMock) Stop() error
Stop does graceful shutdown of this handler
Click to show internal directories.
Click to hide internal directories.