controller

package
v0.0.0-...-52cd4e6 Latest Latest
Warning

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

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

Documentation

Overview

Package controller used deal with the backend backend content resources

Package controller used deal with the backend backend content resources

Package controller used deal with the backend backend content resources

Package controller used deal with the backend backend content resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSideCarBackendController

func NewSideCarBackendController(request BackendControllerRequest) *backendController

NewSideCarBackendController return a new *backendController

Types

type BackendControllerRequest

type BackendControllerRequest struct {
	// provider name
	ProviderName string
	// storage backend client
	ClientSet clientSet.Interface
	// storageBackend interfaces
	Backend storageBackend.BackendInterfaces
	// provider time out
	TimeOut time.Duration
	// storage backend content informer
	ContentInformer backendInformers.StorageBackendContentInformer
	// reSync period time
	ReSyncPeriod time.Duration
	// event recorder
	EventRecorder record.EventRecorder
}

BackendControllerRequest is a request for new controller

type Handler

type Handler interface {
	// CreateStorageBackend add storageBackend to provider
	CreateStorageBackend(ctx context.Context, content *xuanwuv1.StorageBackendContent) (string, string, error)
	// DeleteStorageBackend remove the storageBackend from provider
	DeleteStorageBackend(ctx context.Context, backendName string) error
	// UpdateStorageBackend update the storageBackend
	UpdateStorageBackend(ctx context.Context, content *xuanwuv1.StorageBackendContent) error
	// GetStorageBackendStats get all backend info from the provider
	GetStorageBackendStats(ctx context.Context, contentName, backendName string) (*drcsi.GetBackendStatsResponse, error)
}

Handler includes the interface of storage backend side

func NewCDRHandler

func NewCDRHandler(backend storageBackend.BackendInterfaces,
	timeout time.Duration) Handler

NewCDRHandler returns a new Handler

Jump to

Keyboard shortcuts

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