Gc edc extension (#402)

* Extension of ExchangeDataCollection for async population.
This commit is contained in:
Danny 2022-07-25 12:46:17 -04:00 committed by GitHub
parent 9e7755cfa7
commit 25c781eec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes" "bytes"
"io" "io"
"github.com/alcionai/corso/internal/connector/support"
"github.com/alcionai/corso/pkg/backup" "github.com/alcionai/corso/pkg/backup"
) )
@ -53,8 +54,13 @@ var _ DataStreamInfo = &ExchangeData{}
// It implements the DataCollection interface // It implements the DataCollection interface
type ExchangeDataCollection struct { type ExchangeDataCollection struct {
// M365 user // M365 user
user string user string
data chan DataStream data chan DataStream
tasks []string
updateCh chan support.ConnectorOperationStatus
service graphService
populateFunc PopulateFunc
// FullPath is the slice representation of the action context passed down through the hierarchy. // FullPath is the slice representation of the action context passed down through the hierarchy.
//The original request can be gleaned from the slice. (e.g. {<tenant ID>, <user ID>, "emails"}) //The original request can be gleaned from the slice. (e.g. {<tenant ID>, <user ID>, "emails"})
fullPath []string fullPath []string

View File

@ -48,6 +48,8 @@ type graphService struct {
failFast bool // if true service will exit sequence upon encountering an error failFast bool // if true service will exit sequence upon encountering an error
} }
type PopulateFunc func(context.Context, graphService, ExchangeDataCollection, chan *support.ConnectorOperationStatus)
func NewGraphConnector(acct account.Account) (*GraphConnector, error) { func NewGraphConnector(acct account.Account) (*GraphConnector, error) {
m365, err := acct.M365Config() m365, err := acct.M365Config()
if err != nil { if err != nil {