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
Click to show internal directories.
Click to hide internal directories.