Gc edc extension (#402)
* Extension of ExchangeDataCollection for async population.
This commit is contained in:
parent
9e7755cfa7
commit
25c781eec6
@ -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
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user