utils

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRemoteNodeNotFound = errors.New("remote node not found")
)

Errors.

Functions

This section is empty.

Types

type RemoteTracker

type RemoteTracker interface {
	SetProviderID(ctx context.Context, cluster types.NamespacedName, nodeName string, providerID string) error
}

RemoteTracker wraps a remote.ClusterCacheTracker for easier testing.

func NewRemoteTracker

func NewRemoteTracker(tracker *remote.ClusterCacheTracker) RemoteTracker

type RemoteTrackerMock

type RemoteTrackerMock struct {
	// contains filtered or unexported fields
}

This is a manually crafted mock. The reason of not using gomock is that we need this mock to be "global" and used across different tests, which gomock does not support.

func NewRemoteTrackerMock

func NewRemoteTrackerMock() *RemoteTrackerMock

func (*RemoteTrackerMock) AddCall

func (r *RemoteTrackerMock) AddCall(cluster types.NamespacedName, call RemoteTrackerMockCall)

func (*RemoteTrackerMock) SetProviderID

func (r *RemoteTrackerMock) SetProviderID(_ context.Context, cluster types.NamespacedName, nodeName string, providerID string) error

type RemoteTrackerMockCall

type RemoteTrackerMockCall struct {
	NodeName   string
	ProviderID string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL