Documentation ¶
Index ¶
- Variables
- func RandomString() string
- func RandomStringWithLen(n int) string
- func RandomStringWithPrefix(prefix string, n int) string
- func WaitUntil(condition ConditionFunc, timeout time.Duration) error
- type ConditionFunc
- type DummyIdentityNotifier
- func (d *DummyIdentityNotifier) InjectIdentitiesForSelector(fqdnSel api.FQDNSelector, ids []identity.NumericIdentity)
- func (d *DummyIdentityNotifier) IsRegistered(selector api.FQDNSelector) bool
- func (d *DummyIdentityNotifier) Lock()
- func (d *DummyIdentityNotifier) RegisterForIdentityUpdatesLocked(selector api.FQDNSelector) (identities []identity.NumericIdentity)
- func (d *DummyIdentityNotifier) Unlock()
- func (d *DummyIdentityNotifier) UnregisterForIdentityUpdatesLocked(selector api.FQDNSelector)
- type TestEndpoint
- func (e *TestEndpoint) ConntrackLocalLocked() bool
- func (e *TestEndpoint) GetCIDRPrefixLengths() ([]int, []int)
- func (e *TestEndpoint) GetID() uint64
- func (e *TestEndpoint) GetIdentity() identity.NumericIdentity
- func (e *TestEndpoint) GetIdentityLocked() identity.NumericIdentity
- func (e *TestEndpoint) GetNodeMAC() mac.MAC
- func (e *TestEndpoint) GetOptions() *option.IntOptions
- func (e *TestEndpoint) GetSecurityIdentity() *identity.Identity
- func (e *TestEndpoint) HasIpvlanDataPath() bool
- func (e *TestEndpoint) IPv4Address() addressing.CiliumIPv4
- func (e *TestEndpoint) IPv6Address() addressing.CiliumIPv6
- func (e *TestEndpoint) InterfaceName() string
- func (e *TestEndpoint) Logger(subsystem string) *logrus.Entry
- func (e *TestEndpoint) MapPath() string
- func (e *TestEndpoint) RequireARPPassthrough() bool
- func (e *TestEndpoint) RequireEgressProg() bool
- func (e *TestEndpoint) RequireEndpointRoute() bool
- func (e *TestEndpoint) RequireRouting() bool
- func (e *TestEndpoint) SetIdentity(secID int64, newEndpoint bool)
- func (e *TestEndpoint) StateDir() string
- func (e *TestEndpoint) StringID() string
Constants ¶
This section is empty.
Variables ¶
var (
CiliumRootDir = "" // Populated from ldflags in Makefile
)
Functions ¶
func RandomString ¶ added in v1.7.8
func RandomString() string
RandomString returns a random string with a predefined length of 12.
func RandomStringWithLen ¶ added in v1.7.8
RandomStringWithLen returns a random string of specified length containing upper- and lowercase runes.
func RandomStringWithPrefix ¶ added in v1.7.8
RandomStringWithPrefix returns a random string of length n + len(prefix) with the given prefix, containing upper- and lowercase runes.
Types ¶
type ConditionFunc ¶
type ConditionFunc func() bool
ConditionFunc is the function implementing the condition, it must return true if the condition has been met
type DummyIdentityNotifier ¶ added in v1.6.8
type DummyIdentityNotifier struct {
// contains filtered or unexported fields
}
func NewDummyIdentityNotifier ¶ added in v1.6.8
func NewDummyIdentityNotifier() *DummyIdentityNotifier
func (*DummyIdentityNotifier) InjectIdentitiesForSelector ¶ added in v1.6.8
func (d *DummyIdentityNotifier) InjectIdentitiesForSelector(fqdnSel api.FQDNSelector, ids []identity.NumericIdentity)
func (*DummyIdentityNotifier) IsRegistered ¶ added in v1.6.8
func (d *DummyIdentityNotifier) IsRegistered(selector api.FQDNSelector) bool
IsRegistered returns whether this selector is being managed.
func (*DummyIdentityNotifier) Lock ¶ added in v1.6.8
func (d *DummyIdentityNotifier) Lock()
Lock must be held during any calls to RegisterForIdentityUpdatesLocked or UnregisterForIdentityUpdatesLocked.
func (*DummyIdentityNotifier) RegisterForIdentityUpdatesLocked ¶ added in v1.6.8
func (d *DummyIdentityNotifier) RegisterForIdentityUpdatesLocked(selector api.FQDNSelector) (identities []identity.NumericIdentity)
RegisterForIdentityUpdatesLocked starts managing this selector.
func (*DummyIdentityNotifier) Unlock ¶ added in v1.6.8
func (d *DummyIdentityNotifier) Unlock()
Unlock must be called after calls to RegisterForIdentityUpdatesLocked or UnregisterForIdentityUpdatesLocked are done.
func (*DummyIdentityNotifier) UnregisterForIdentityUpdatesLocked ¶ added in v1.6.8
func (d *DummyIdentityNotifier) UnregisterForIdentityUpdatesLocked(selector api.FQDNSelector)
UnregisterForIdentityUpdatesLocked stops managing this selector.
type TestEndpoint ¶
type TestEndpoint struct { Id uint64 Identity *identity.Identity Opts *option.IntOptions MAC mac.MAC }
func NewTestEndpoint ¶
func NewTestEndpoint() TestEndpoint
func (*TestEndpoint) ConntrackLocalLocked ¶
func (e *TestEndpoint) ConntrackLocalLocked() bool
func (*TestEndpoint) GetCIDRPrefixLengths ¶
func (e *TestEndpoint) GetCIDRPrefixLengths() ([]int, []int)
func (*TestEndpoint) GetID ¶
func (e *TestEndpoint) GetID() uint64
func (*TestEndpoint) GetIdentity ¶
func (e *TestEndpoint) GetIdentity() identity.NumericIdentity
func (*TestEndpoint) GetIdentityLocked ¶
func (e *TestEndpoint) GetIdentityLocked() identity.NumericIdentity
func (*TestEndpoint) GetNodeMAC ¶
func (e *TestEndpoint) GetNodeMAC() mac.MAC
func (*TestEndpoint) GetOptions ¶
func (e *TestEndpoint) GetOptions() *option.IntOptions
func (*TestEndpoint) GetSecurityIdentity ¶
func (e *TestEndpoint) GetSecurityIdentity() *identity.Identity
func (*TestEndpoint) HasIpvlanDataPath ¶ added in v1.5.0
func (e *TestEndpoint) HasIpvlanDataPath() bool
func (*TestEndpoint) IPv4Address ¶
func (e *TestEndpoint) IPv4Address() addressing.CiliumIPv4
func (*TestEndpoint) IPv6Address ¶
func (e *TestEndpoint) IPv6Address() addressing.CiliumIPv6
func (*TestEndpoint) InterfaceName ¶
func (e *TestEndpoint) InterfaceName() string
func (*TestEndpoint) MapPath ¶ added in v1.5.0
func (e *TestEndpoint) MapPath() string
func (*TestEndpoint) RequireARPPassthrough ¶
func (e *TestEndpoint) RequireARPPassthrough() bool
func (*TestEndpoint) RequireEgressProg ¶
func (e *TestEndpoint) RequireEgressProg() bool
func (*TestEndpoint) RequireEndpointRoute ¶
func (e *TestEndpoint) RequireEndpointRoute() bool
func (*TestEndpoint) RequireRouting ¶
func (e *TestEndpoint) RequireRouting() bool
func (*TestEndpoint) SetIdentity ¶
func (e *TestEndpoint) SetIdentity(secID int64, newEndpoint bool)
func (*TestEndpoint) StateDir ¶
func (e *TestEndpoint) StateDir() string
func (*TestEndpoint) StringID ¶
func (e *TestEndpoint) StringID() string