mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 13:05:17 +00:00
chore: enable use-any from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -85,7 +85,7 @@ func newFileSystemBR(jobName string, requestorType string, client client.Client,
|
||||
return fs
|
||||
}
|
||||
|
||||
func (fs *fileSystemBR) Init(ctx context.Context, param interface{}) error {
|
||||
func (fs *fileSystemBR) Init(ctx context.Context, param any) error {
|
||||
initParam := param.(*FSBRInitParam)
|
||||
|
||||
var err error
|
||||
@@ -164,7 +164,7 @@ func (fs *fileSystemBR) close(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
func (fs *fileSystemBR) StartBackup(source AccessPoint, uploaderConfig map[string]string, param interface{}) error {
|
||||
func (fs *fileSystemBR) StartBackup(source AccessPoint, uploaderConfig map[string]string, param any) error {
|
||||
if !fs.initialized {
|
||||
return errors.New("file system data path is not initialized")
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func newMicroServiceBRWatcher(client client.Client, kubeClient kubernetes.Interf
|
||||
return ms
|
||||
}
|
||||
|
||||
func (ms *microServiceBRWatcher) Init(ctx context.Context, param interface{}) error {
|
||||
func (ms *microServiceBRWatcher) Init(ctx context.Context, param any) error {
|
||||
eventInformer, err := ms.mgr.GetCache().GetInformer(ctx, &v1.Event{})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error getting event informer")
|
||||
@@ -117,7 +117,7 @@ func (ms *microServiceBRWatcher) Init(ctx context.Context, param interface{}) er
|
||||
|
||||
eventHandler, err := eventInformer.AddEventHandler(
|
||||
cache.ResourceEventHandlerFuncs{
|
||||
AddFunc: func(obj interface{}) {
|
||||
AddFunc: func(obj any) {
|
||||
evt := obj.(*v1.Event)
|
||||
if evt.InvolvedObject.Namespace != ms.namespace || evt.InvolvedObject.Name != ms.associatedObject {
|
||||
return
|
||||
@@ -125,7 +125,7 @@ func (ms *microServiceBRWatcher) Init(ctx context.Context, param interface{}) er
|
||||
|
||||
ms.eventCh <- evt
|
||||
},
|
||||
UpdateFunc: func(_, obj interface{}) {
|
||||
UpdateFunc: func(_, obj any) {
|
||||
evt := obj.(*v1.Event)
|
||||
if evt.InvolvedObject.Namespace != ms.namespace || evt.InvolvedObject.Name != ms.associatedObject {
|
||||
return
|
||||
@@ -141,7 +141,7 @@ func (ms *microServiceBRWatcher) Init(ctx context.Context, param interface{}) er
|
||||
|
||||
podHandler, err := podInformer.AddEventHandler(
|
||||
cache.ResourceEventHandlerFuncs{
|
||||
UpdateFunc: func(_, obj interface{}) {
|
||||
UpdateFunc: func(_, obj any) {
|
||||
pod := obj.(*v1.Pod)
|
||||
if pod.Namespace != ms.namespace || pod.Name != ms.thisPod {
|
||||
return
|
||||
@@ -213,7 +213,7 @@ func (ms *microServiceBRWatcher) close() {
|
||||
}
|
||||
}
|
||||
|
||||
func (ms *microServiceBRWatcher) StartBackup(source AccessPoint, uploaderConfig map[string]string, param interface{}) error {
|
||||
func (ms *microServiceBRWatcher) StartBackup(source AccessPoint, uploaderConfig map[string]string, param any) error {
|
||||
ms.log.Infof("Start watching backup ms for source %v", source.ByPath)
|
||||
|
||||
ms.startWatch()
|
||||
|
||||
@@ -59,10 +59,10 @@ type AccessPoint struct {
|
||||
// AsyncBR is the interface for asynchronous data path methods
|
||||
type AsyncBR interface {
|
||||
// Init initializes an asynchronous data path instance
|
||||
Init(ctx context.Context, param interface{}) error
|
||||
Init(ctx context.Context, param any) error
|
||||
|
||||
// StartBackup starts an asynchronous data path instance for backup
|
||||
StartBackup(source AccessPoint, dataMoverConfig map[string]string, param interface{}) error
|
||||
StartBackup(source AccessPoint, dataMoverConfig map[string]string, param any) error
|
||||
|
||||
// StartRestore starts an asynchronous data path instance for restore
|
||||
StartRestore(snapshotID string, target AccessPoint, dataMoverConfig map[string]string) error
|
||||
|
||||
Reference in New Issue
Block a user