sync

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunSyncServices

func RunSyncServices(
	context context.Context,
	db *gorm.DB,
	clusterManager api.ClusterManager,
	logger logrus.FieldLogger,
	errorHandler emperror.Handler,
	bucketSyncInterval, restoreSyncInterval, backupSyncInterval time.Duration,
)

RunSyncServices runs ARK sync services

Types

type BackupsSyncService

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

BackupsSyncService is for syncing backups between Pipeline DB and ARK for an Org

func NewBackupsSyncService

func NewBackupsSyncService(org *auth.Organization, db *gorm.DB, logger logrus.FieldLogger) *BackupsSyncService

NewBackupsSyncService returns an initialized BackupsSyncService

func (*BackupsSyncService) SyncBackups

func (s *BackupsSyncService) SyncBackups(clusterManager api.ClusterManager) error

SyncBackups syncs backups between Pipeline DB and ARK for every Cluster within the Org

func (*BackupsSyncService) SyncBackupsForCluster

func (s *BackupsSyncService) SyncBackupsForCluster(cluster api.Cluster) error

SyncBackupsForCluster syncs backups between Pipeline DB and ARK for a Cluster

type BucketsSyncService

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

BucketsSyncService is for syncing backups from object store buckets

func NewBucketsSyncService

func NewBucketsSyncService(
	org *auth.Organization,
	db *gorm.DB,
	logger logrus.FieldLogger,
) *BucketsSyncService

NewBucketsSyncService returns an initialized BucketsSyncService

func (*BucketsSyncService) SyncBackupsFromBuckets

func (s *BucketsSyncService) SyncBackupsFromBuckets() error

SyncBackupsFromBuckets syncs backups from object store buckets for ARK backup bucket for within the organization

type RestoresSyncService

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

RestoresSyncService is for syncing restores from ARK

func NewRestoresSyncService

func NewRestoresSyncService(
	org *auth.Organization,
	db *gorm.DB,
	logger logrus.FieldLogger,
) *RestoresSyncService

NewRestoresSyncService returns an initialized RestoresSyncService

func (*RestoresSyncService) SyncRestores

func (s *RestoresSyncService) SyncRestores(clusterManager api.ClusterManager) error

SyncRestores syncs restores from ARK for every cluster within the organization

func (*RestoresSyncService) SyncRestoresForCluster

func (s *RestoresSyncService) SyncRestoresForCluster(cluster api.Cluster) error

type Service

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

Service describes a service for every ARK related sync operations

func NewSyncService

func NewSyncService(
	ClusterManager api.ClusterManager,
	BucketSyncInterval time.Duration,
	RestoreSyncInterval time.Duration,
	BackupSyncInterval time.Duration,
) *Service

NewSyncService creates and initializes a Service

func (*Service) Run

func (s *Service) Run(context context.Context, db *gorm.DB, logger logrus.FieldLogger)

Run runs every ARK related sync services

Jump to

Keyboard shortcuts

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