storagecontrol

package
v1.134.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package storagecontrol is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnywhereCacheModel added in v1.132.0

func NewAnywhereCacheModel(_ context.Context, config *config.ControllerConfig) (directbase.Model, error)

func NewFolderModel

func NewFolderModel(ctx context.Context, config *config.ControllerConfig) (directbase.Model, error)

func PendingRenameInfoObservedState_FromProto

func PendingRenameInfoObservedState_FromProto(mapCtx *direct.MapContext, in *pb.PendingRenameInfo) *krm.PendingRenameInfoObservedState

func PendingRenameInfoObservedState_ToProto

func PendingRenameInfoObservedState_ToProto(mapCtx *direct.MapContext, in *krm.PendingRenameInfoObservedState) *pb.PendingRenameInfo

func PendingRenameInfo_FromProto

func PendingRenameInfo_FromProto(mapCtx *direct.MapContext, in *pb.PendingRenameInfo) *krm.PendingRenameInfo

func PendingRenameInfo_ToProto

func PendingRenameInfo_ToProto(mapCtx *direct.MapContext, in *krm.PendingRenameInfo) *pb.PendingRenameInfo

func StorageAnywhereCacheFuzzer added in v1.132.0

func StorageAnywhereCacheFuzzer() fuzztesting.KRMFuzzer

func StorageAnywhereCacheObservedState_FromProto added in v1.132.0

func StorageAnywhereCacheObservedState_FromProto(mapCtx *direct.MapContext, in *pb.AnywhereCache) *krm.StorageAnywhereCacheObservedState

func StorageAnywhereCacheObservedState_ToProto added in v1.132.0

func StorageAnywhereCacheObservedState_ToProto(mapCtx *direct.MapContext, in *krm.StorageAnywhereCacheObservedState) *pb.AnywhereCache

func StorageAnywhereCacheSpec_FromProto added in v1.132.0

func StorageAnywhereCacheSpec_FromProto(mapCtx *direct.MapContext, in *pb.AnywhereCache) *krm.StorageAnywhereCacheSpec

func StorageAnywhereCacheSpec_ToProto added in v1.132.0

func StorageAnywhereCacheSpec_ToProto(mapCtx *direct.MapContext, in *krm.StorageAnywhereCacheSpec) *pb.AnywhereCache

func StorageFolderFuzzer

func StorageFolderFuzzer() fuzztesting.KRMFuzzer

func StorageFolderObservedState_FromProto

func StorageFolderObservedState_FromProto(mapCtx *direct.MapContext, in *pb.Folder) *krm.StorageFolderObservedState

func StorageFolderObservedState_ToProto

func StorageFolderObservedState_ToProto(mapCtx *direct.MapContext, in *krm.StorageFolderObservedState) *pb.Folder

func StorageFolderSpec_FromProto

func StorageFolderSpec_FromProto(mapCtx *direct.MapContext, in *pb.Folder) *krm.StorageFolderSpec

func StorageFolderSpec_ToProto

func StorageFolderSpec_ToProto(mapCtx *direct.MapContext, in *krm.StorageFolderSpec) *pb.Folder

func StorageManagedFolderObservedState_FromProto

func StorageManagedFolderObservedState_FromProto(mapCtx *direct.MapContext, in *pb.ManagedFolder) *krm.StorageManagedFolderObservedState

func StorageManagedFolderObservedState_ToProto

func StorageManagedFolderObservedState_ToProto(mapCtx *direct.MapContext, in *krm.StorageManagedFolderObservedState) *pb.ManagedFolder

func StorageManagedFolderSpec_FromProto

func StorageManagedFolderSpec_FromProto(mapCtx *direct.MapContext, in *pb.ManagedFolder) *krm.StorageManagedFolderSpec

func StorageManagedFolderSpec_ToProto

func StorageManagedFolderSpec_ToProto(mapCtx *direct.MapContext, in *krm.StorageManagedFolderSpec) *pb.ManagedFolder

Types

type AnywhereCacheAPI added in v1.132.0

type AnywhereCacheAPI interface {
	CreateAnywhereCache(ctx context.Context, in *controlpb.CreateAnywhereCacheRequest, opts ...gax.CallOption) (*control.CreateAnywhereCacheOperation, error)
	UpdateAnywhereCache(ctx context.Context, in *controlpb.UpdateAnywhereCacheRequest, opts ...gax.CallOption) (*control.UpdateAnywhereCacheOperation, error)
	DisableAnywhereCache(ctx context.Context, in *controlpb.DisableAnywhereCacheRequest, opts ...gax.CallOption) (*controlpb.AnywhereCache, error)
	PauseAnywhereCache(ctx context.Context, in *controlpb.PauseAnywhereCacheRequest, opts ...gax.CallOption) (*controlpb.AnywhereCache, error)
	ResumeAnywhereCache(ctx context.Context, in *controlpb.ResumeAnywhereCacheRequest, opts ...gax.CallOption) (*controlpb.AnywhereCache, error)
	GetAnywhereCache(ctx context.Context, in *controlpb.GetAnywhereCacheRequest, opts ...gax.CallOption) (*controlpb.AnywhereCache, error)
	ListAnywhereCaches(ctx context.Context, in *controlpb.ListAnywhereCachesRequest, opts ...gax.CallOption) *control.AnywhereCacheIterator
}

type AnywhereCacheAdapter added in v1.132.0

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

func (*AnywhereCacheAdapter) Create added in v1.132.0

Create creates the resource in GCP based on `spec` and update the Config Connector object `status` based on the GCP response.

func (*AnywhereCacheAdapter) Delete added in v1.132.0

Delete the resource from GCP service by disabling it when the corresponding Config Connector resource is deleted.

func (*AnywhereCacheAdapter) Export added in v1.132.0

Export maps the GCP object to a Config Connector resource `spec`.

func (*AnywhereCacheAdapter) Find added in v1.132.0

func (a *AnywhereCacheAdapter) Find(ctx context.Context) (bool, error)

Find retrieves the GCP resource. Return true means the object is found. This triggers Adapter `Update` call. Return false means the object is not found. This triggers Adapter `Create` call. Return a non-nil error requeues the requests.

func (*AnywhereCacheAdapter) GetCurrentState added in v1.132.0

func (a *AnywhereCacheAdapter) GetCurrentState() string

GetCurrentState returns the current state of the AnywhereCache from its actual GCP representation.

func (*AnywhereCacheAdapter) GetDesiredState added in v1.132.0

func (a *AnywhereCacheAdapter) GetDesiredState() string

GetDesiredState returns the desired state of the AnywhereCache from the KRM spec. Defaults to "running" if not explicitly specified in the spec.

func (*AnywhereCacheAdapter) GetUpdateStatus added in v1.132.0

func (a *AnywhereCacheAdapter) GetUpdateStatus(ctx context.Context, fetchGcp bool) (*krm.StorageAnywhereCacheStatus, error)

GetUpdateStatus returns the update status from GCP metadata or KRM metadata based on the provided argument. If `fetchGcp` is true, it makes a fresh GCP API call to get the latest resource state.

func (*AnywhereCacheAdapter) IsStateChangeRequested added in v1.132.0

func (a *AnywhereCacheAdapter) IsStateChangeRequested() bool

IsStateChangeRequested checks if a state change is requested by comparing current and desired states.

func (*AnywhereCacheAdapter) Update added in v1.132.0

func (*AnywhereCacheAdapter) UpdateCache added in v1.132.0

func (a *AnywhereCacheAdapter) UpdateCache(ctx context.Context, updateOp DirectBaseUpdateOperation) error

We primarily receive two types of updates: state changes and metadata changes. To maintain simplicity, these are kept separate, with state changes prioritized. This means that if an update involves both the cache state and metadata changes, the cache state is updated first, followed by the metadata fields.

Update updates the resource in GCP based on `spec` and updates the Config Connector object `status` based on the GCP response.

func (*AnywhereCacheAdapter) UpdateState added in v1.132.0

func (a *AnywhereCacheAdapter) UpdateState(ctx context.Context) error

UpdateState changes the cache state to the desired state if different from current.

type DirectBaseUpdateOperation added in v1.132.0

type DirectBaseUpdateOperation interface {
	UpdateStatus(ctx context.Context, typedStatus any, readyCondition *v1alpha1.Condition) error
	RequestRequeue()
}

type FolderAdapter

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

func (*FolderAdapter) Create

func (a *FolderAdapter) Create(ctx context.Context, createOp *directbase.CreateOperation) error

Create creates the resource in GCP based on `spec` and update the Config Connector object `status` based on the GCP response.

func (*FolderAdapter) Delete

func (a *FolderAdapter) Delete(ctx context.Context, deleteOp *directbase.DeleteOperation) (bool, error)

Delete the resource from GCP service when the corresponding Config Connector resource is deleted.

func (*FolderAdapter) Export

Export maps the GCP object to a Config Connector resource `spec`.

func (*FolderAdapter) Find

func (a *FolderAdapter) Find(ctx context.Context) (bool, error)

Find retrieves the GCP resource. Return true means the object is found. This triggers Adapter `Update` call. Return false means the object is not found. This triggers Adapter `Create` call. Return a non-nil error requeues the requests.

func (*FolderAdapter) Update

func (a *FolderAdapter) Update(ctx context.Context, updateOp *directbase.UpdateOperation) error

Update updates the resource in GCP based on `spec` and update the Config Connector object `status` based on the GCP response.

type MockAnywhereCacheAPI added in v1.132.0

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

MockAnywhereCacheAPI is a mock of AnywhereCacheAPI interface.

func NewMockAnywhereCacheAPI added in v1.132.0

func NewMockAnywhereCacheAPI(ctrl *gomock.Controller) *MockAnywhereCacheAPI

NewMockAnywhereCacheAPI creates a new mock instance.

func (*MockAnywhereCacheAPI) CreateAnywhereCache added in v1.132.0

CreateAnywhereCache mocks base method.

func (*MockAnywhereCacheAPI) DisableAnywhereCache added in v1.132.0

DisableAnywhereCache mocks base method.

func (*MockAnywhereCacheAPI) EXPECT added in v1.132.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAnywhereCacheAPI) GetAnywhereCache added in v1.132.0

GetAnywhereCache mocks base method.

func (*MockAnywhereCacheAPI) ListAnywhereCaches added in v1.132.0

ListAnywhereCaches mocks base method.

func (*MockAnywhereCacheAPI) PauseAnywhereCache added in v1.132.0

PauseAnywhereCache mocks base method.

func (*MockAnywhereCacheAPI) ResumeAnywhereCache added in v1.132.0

ResumeAnywhereCache mocks base method.

func (*MockAnywhereCacheAPI) UpdateAnywhereCache added in v1.132.0

UpdateAnywhereCache mocks base method.

type MockAnywhereCacheAPIMockRecorder added in v1.132.0

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

MockAnywhereCacheAPIMockRecorder is the mock recorder for MockAnywhereCacheAPI.

func (*MockAnywhereCacheAPIMockRecorder) CreateAnywhereCache added in v1.132.0

func (mr *MockAnywhereCacheAPIMockRecorder) CreateAnywhereCache(ctx, in any, opts ...any) *gomock.Call

CreateAnywhereCache indicates an expected call of CreateAnywhereCache.

func (*MockAnywhereCacheAPIMockRecorder) DisableAnywhereCache added in v1.132.0

func (mr *MockAnywhereCacheAPIMockRecorder) DisableAnywhereCache(ctx, in any, opts ...any) *gomock.Call

DisableAnywhereCache indicates an expected call of DisableAnywhereCache.

func (*MockAnywhereCacheAPIMockRecorder) GetAnywhereCache added in v1.132.0

func (mr *MockAnywhereCacheAPIMockRecorder) GetAnywhereCache(ctx, in any, opts ...any) *gomock.Call

GetAnywhereCache indicates an expected call of GetAnywhereCache.

func (*MockAnywhereCacheAPIMockRecorder) ListAnywhereCaches added in v1.132.0

func (mr *MockAnywhereCacheAPIMockRecorder) ListAnywhereCaches(ctx, in any, opts ...any) *gomock.Call

ListAnywhereCaches indicates an expected call of ListAnywhereCaches.

func (*MockAnywhereCacheAPIMockRecorder) PauseAnywhereCache added in v1.132.0

func (mr *MockAnywhereCacheAPIMockRecorder) PauseAnywhereCache(ctx, in any, opts ...any) *gomock.Call

PauseAnywhereCache indicates an expected call of PauseAnywhereCache.

func (*MockAnywhereCacheAPIMockRecorder) ResumeAnywhereCache added in v1.132.0

func (mr *MockAnywhereCacheAPIMockRecorder) ResumeAnywhereCache(ctx, in any, opts ...any) *gomock.Call

ResumeAnywhereCache indicates an expected call of ResumeAnywhereCache.

func (*MockAnywhereCacheAPIMockRecorder) UpdateAnywhereCache added in v1.132.0

func (mr *MockAnywhereCacheAPIMockRecorder) UpdateAnywhereCache(ctx, in any, opts ...any) *gomock.Call

UpdateAnywhereCache indicates an expected call of UpdateAnywhereCache.

type MockDirectBaseUpdateOperation added in v1.132.0

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

MockDirectBaseUpdateOperation is a mock of DirectBaseUpdateOperation interface.

func NewMockDirectBaseUpdateOperation added in v1.132.0

func NewMockDirectBaseUpdateOperation(ctrl *gomock.Controller) *MockDirectBaseUpdateOperation

NewMockDirectBaseUpdateOperation creates a new mock instance.

func (*MockDirectBaseUpdateOperation) EXPECT added in v1.132.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDirectBaseUpdateOperation) RequestRequeue added in v1.132.0

func (m *MockDirectBaseUpdateOperation) RequestRequeue()

RequestRequeue mocks base method.

func (*MockDirectBaseUpdateOperation) UpdateStatus added in v1.132.0

func (m *MockDirectBaseUpdateOperation) UpdateStatus(ctx context.Context, typedStatus any, readyCondition *v1alpha1.Condition) error

UpdateStatus mocks base method.

type MockDirectBaseUpdateOperationMockRecorder added in v1.132.0

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

MockDirectBaseUpdateOperationMockRecorder is the mock recorder for MockDirectBaseUpdateOperation.

func (*MockDirectBaseUpdateOperationMockRecorder) RequestRequeue added in v1.132.0

RequestRequeue indicates an expected call of RequestRequeue.

func (*MockDirectBaseUpdateOperationMockRecorder) UpdateStatus added in v1.132.0

func (mr *MockDirectBaseUpdateOperationMockRecorder) UpdateStatus(ctx, typedStatus, readyCondition any) *gomock.Call

UpdateStatus indicates an expected call of UpdateStatus.

Jump to

Keyboard shortcuts

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