Documentation ¶
Index ¶
- Variables
- type Controller
- func (ctrl *Controller) CacheItemInfo(dii details.ItemInfo)
- func (ctrl *Controller) DeserializeMetadataFiles(ctx context.Context, colls []data.RestoreCollection) ([]store.MetadataFile, error)
- func (ctrl *Controller) GetMetadataPaths(ctx context.Context, r kinject.RestoreProducer, ...) ([]path.RestorePaths, error)
- func (ctrl *Controller) IsServiceEnabled(ctx context.Context, service path.ServiceType, resourceOwner string) (bool, error)
- func (ctrl *Controller) NewServiceHandler(service path.ServiceType) (inject.ServiceHandler, error)
- func (ctrl *Controller) PopulateProtectedResourceIDAndName(ctx context.Context, resourceID string, ins idname.Cacher) (idname.Provider, error)
- func (ctrl *Controller) PrintableStatus() string
- func (ctrl *Controller) ProduceBackupCollections(ctx context.Context, bpc inject.BackupProducerConfig, counter *count.Bus, ...) ([]data.BackupCollection, prefixmatcher.StringSetReader, bool, error)
- func (ctrl *Controller) SetRateLimiter(ctx context.Context, service path.ServiceType, options control.Options) context.Context
- func (ctrl *Controller) Status() support.ControllerOperationStatus
- func (ctrl *Controller) UpdateStatus(status *support.ControllerOperationStatus)
- func (ctrl *Controller) VerifyAccess(ctx context.Context) error
- func (ctrl *Controller) Wait() *data.CollectionStats
Constants ¶
This section is empty.
Variables ¶
var ErrNoResourceLookup = clues.New("missing resource lookup client")
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { AC api.Client // maps of resource owner ids to names, and names to ids. // not guaranteed to be populated, only here as a post-population // reference for processes that choose to populate the values. IDNameLookup idname.Cacher // contains filtered or unexported fields }
Controller is a struct used to wrap the GraphServiceClient and GraphRequestAdapter from the msgraph-sdk-go. Additional fields are for bookkeeping and interfacing with other component.
func NewController ¶
func (*Controller) CacheItemInfo ¶
func (ctrl *Controller) CacheItemInfo(dii details.ItemInfo)
func (*Controller) DeserializeMetadataFiles ¶
func (ctrl *Controller) DeserializeMetadataFiles( ctx context.Context, colls []data.RestoreCollection, ) ([]store.MetadataFile, error)
func (*Controller) GetMetadataPaths ¶
func (ctrl *Controller) GetMetadataPaths( ctx context.Context, r kinject.RestoreProducer, base inject.ReasonAndSnapshotIDer, errs *fault.Bus, ) ([]path.RestorePaths, error)
func (*Controller) IsServiceEnabled ¶
func (ctrl *Controller) IsServiceEnabled( ctx context.Context, service path.ServiceType, resourceOwner string, ) (bool, error)
func (*Controller) NewServiceHandler ¶
func (ctrl *Controller) NewServiceHandler( service path.ServiceType, ) (inject.ServiceHandler, error)
NewServiceHandler returns an instance of a struct capable of running various operations for a given service.
func (*Controller) PopulateProtectedResourceIDAndName ¶
func (ctrl *Controller) PopulateProtectedResourceIDAndName( ctx context.Context, resourceID string, ins idname.Cacher, ) (idname.Provider, error)
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 is 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.
func (*Controller) PrintableStatus ¶
func (ctrl *Controller) PrintableStatus() string
PrintableStatus returns a string formatted version of the status.
func (*Controller) ProduceBackupCollections ¶
func (ctrl *Controller) ProduceBackupCollections( ctx context.Context, bpc inject.BackupProducerConfig, counter *count.Bus, errs *fault.Bus, ) ([]data.BackupCollection, prefixmatcher.StringSetReader, bool, error)
ProduceBackupCollections generates a slice of data.BackupCollections for the service specified in the selectors. The metadata field can include things like delta tokens or the previous backup's folder hierarchy. The absence of metadata causes the collection creation to ignore prior history (ie, incrementals) and run a full backup.
func (*Controller) SetRateLimiter ¶
func (ctrl *Controller) SetRateLimiter( ctx context.Context, service path.ServiceType, options control.Options, ) context.Context
func (*Controller) Status ¶
func (ctrl *Controller) Status() support.ControllerOperationStatus
Status returns the current status of the controller process.
func (*Controller) UpdateStatus ¶
func (ctrl *Controller) UpdateStatus(status *support.ControllerOperationStatus)
UpdateStatus is used by initiated tasks to indicate completion
func (*Controller) VerifyAccess ¶
func (ctrl *Controller) VerifyAccess(ctx context.Context) error
func (*Controller) Wait ¶
func (ctrl *Controller) Wait() *data.CollectionStats
AwaitStatus waits for all tasks to complete and then returns status