Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupProducer ¶
type BackupProducer interface { ProduceBackupCollections( ctx context.Context, bpc BackupProducerConfig, counter *count.Bus, errs *fault.Bus, ) ([]data.BackupCollection, prefixmatcher.StringSetReader, bool, error) IsServiceEnableder // GetMetadataPaths returns a list of paths that form metadata // collections. In case of service that have just a single // underlying service like OneDrive or SharePoint, it will mostly // just have a single collection per manifest reason, but in the // case of groups, it will contain a collection each for the // underlying service, for example one per SharePoint site. GetMetadataPaths( ctx context.Context, r inject.RestoreProducer, base ReasonAndSnapshotIDer, errs *fault.Bus, ) ([]path.RestorePaths, error) Wait() *data.CollectionStats // SetRateLimiter selects a rate limiter type for the service being // backed up and binds it to the context. SetRateLimiter( ctx context.Context, service path.ServiceType, options control.Options, ) context.Context }
type BackupProducerConfig ¶
type BackupProducerConfig struct { LastBackupVersion int MetadataCollections []data.RestoreCollection Options control.Options ProtectedResource idname.Provider Selector selectors.Selector }
BackupProducerConfig is a container-of-things for holding options and configurations from various packages, all of which are widely used by backup producers independent of service or data category.
type CacheItemInfoer ¶
type ExportConsumer ¶
type ExportConsumer interface { ProduceExportCollections( ctx context.Context, backupVersion int, exportCfg control.ExportConfig, dcs []data.RestoreCollection, stats *metrics.ExportStats, errs *fault.Bus, ) ([]export.Collectioner, error) CacheItemInfoer }
type IsServiceEnableder ¶
type PopulateProtectedResourceIDAndNamer ¶
type PopulateProtectedResourceIDAndNamer interface { // PopulateProtectedResourceIDAndName takes the provided owner identifier and produces // the owner's name and ID from that value. Returns an error if the owner is // not recognized by the current tenant. // // The id-name cacher should be optional. Some processes will look up all owners in // the tenant before reaching this step. In that case, the data gets handed // down for this func to consume instead of performing further queries. The // data gets stored inside the controller instance for later re-use. PopulateProtectedResourceIDAndName( ctx context.Context, owner string, ins idname.Cacher, ) (idname.Provider, error) }
type ReasonAndSnapshotIDer ¶
type RepoMaintenancer ¶
type RepoMaintenancer interface {
RepoMaintenance(ctx context.Context, opts repository.Maintenance) error
}
type RestoreConsumer ¶
type RestoreConsumer interface { ConsumeRestoreCollections( ctx context.Context, rcc RestoreConsumerConfig, dcs []data.RestoreCollection, errs *fault.Bus, ctr *count.Bus, ) (*details.Details, *data.CollectionStats, error) // TODO(ashmrtn): Update the IsServiceEnableder interface once // BackupProducer is also switched to service handlers. IsServiceEnabled(ctx context.Context, resourceOwner string) (bool, error) CacheItemInfoer PopulateProtectedResourceIDAndNamer }
type RestoreConsumerConfig ¶
type RestoreConsumerConfig struct { BackupVersion int Options control.Options ProtectedResource idname.Provider RestoreConfig control.RestoreConfig Selector selectors.Selector }
RestoreConsumerConfig is a container-of-things for holding options and configurations from various packages, all of which are widely used by restore consumers independent of service or data category.
type ServiceHandler ¶
type ServiceHandler interface { ExportConsumer RestoreConsumer }
ServiceHandler contains the set of functions required to implement all service-specific functionality for backups, restores, and exports.
type ToServiceHandler ¶
type ToServiceHandler interface { NewServiceHandler( service path.ServiceType, ) (ServiceHandler, error) }
Click to show internal directories.
Click to hide internal directories.