Documentation ¶
Index ¶
- type FakeIdentityAllocator
- func (f *FakeIdentityAllocator) AllocateIdentity(context.Context, labels.Labels, bool) (*identity.Identity, bool, error)
- func (f *FakeIdentityAllocator) LookupIdentityByID(ctx context.Context, id identity.NumericIdentity) *identity.Identity
- func (f *FakeIdentityAllocator) Release(context.Context, *identity.Identity) (released bool, err error)
- func (f *FakeIdentityAllocator) WaitForInitialGlobalIdentities(context.Context) error
- type IdentityAllocatorOwnerMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeIdentityAllocator ¶
type FakeIdentityAllocator struct{}
FakeIdentityAllocator is used as a mock identity allocator for unit tests.
func (*FakeIdentityAllocator) AllocateIdentity ¶
func (f *FakeIdentityAllocator) AllocateIdentity(context.Context, labels.Labels, bool) (*identity.Identity, bool, error)
AllocateIdentity does nothing.
func (*FakeIdentityAllocator) LookupIdentityByID ¶
func (f *FakeIdentityAllocator) LookupIdentityByID(ctx context.Context, id identity.NumericIdentity) *identity.Identity
LookupIdentityByID returns the identity corresponding to the id if the identity is a reserved identity. Otherwise, returns nil.
func (*FakeIdentityAllocator) Release ¶
func (f *FakeIdentityAllocator) Release(context.Context, *identity.Identity) (released bool, err error)
Release does nothing.
func (*FakeIdentityAllocator) WaitForInitialGlobalIdentities ¶
func (f *FakeIdentityAllocator) WaitForInitialGlobalIdentities(context.Context) error
WaitForInitialGlobalIdentities does nothing.
type IdentityAllocatorOwnerMock ¶
type IdentityAllocatorOwnerMock struct{}
func (*IdentityAllocatorOwnerMock) GetNodeSuffix ¶
func (i *IdentityAllocatorOwnerMock) GetNodeSuffix() string
func (*IdentityAllocatorOwnerMock) UpdateIdentities ¶
func (i *IdentityAllocatorOwnerMock) UpdateIdentities(added, deleted cache.IdentityCache)
Click to show internal directories.
Click to hide internal directories.