Documentation ¶
Index ¶
Constants ¶
View Source
const ( SVCIPv4 = SVCL3Type("IPv4") SVCIPv6 = SVCL3Type("IPV6") )
Variables ¶
This section is empty.
Functions ¶
func MapInOrder ¶
func MapInOrder[M ~map[K]V, K constraints.Ordered, V any](m M, fn func(K, V))
MapInOrder does an in-order traversal of a map.
Types ¶
type LBMapAssert ¶
type LBMapAssert struct {
// contains filtered or unexported fields
}
func NewLBMapAssert ¶
func NewLBMapAssert(lbmap *mockmaps.LBMockMap) LBMapAssert
func (LBMapAssert) FindServiceWithBackend ¶
func (a LBMapAssert) FindServiceWithBackend(name string, svcType lb.SVCType, l3 SVCL3Type, l4 lb.L4Type, port uint16) *lb.SVC
findService finds a service matching the parameters and that it has a backend with specified l4 type and port.
Linear in time, but should be OK for tests with few 10s of services and backends.
func (LBMapAssert) ServicesExist ¶
func (a LBMapAssert) ServicesExist(name string, svcTypes []lb.SVCType, l3s []SVCL3Type, l4 lb.L4Type, port uint16) error
servicesExist asserts that the service with given name (<namespace>/<name>) exists for the listed service types and has frontends with the given L3 protocols, and that it has backend with the given L4 type and port.
Click to show internal directories.
Click to hide internal directories.