GODT-2224: Allow the user to specify max sync memory usage in Vault

This commit is contained in:
Leander Beernaert
2023-01-31 09:13:41 +01:00
parent c8065c8092
commit c0aacb7d62
7 changed files with 67 additions and 9 deletions

View File

@ -85,6 +85,8 @@ type User struct {
goPollAPIEvents func(wait bool)
showAllMail uint32
maxSyncMemory uint64
}
// New returns a new user.
@ -98,6 +100,7 @@ func New(
apiUser proton.User,
crashHandler async.PanicHandler,
showAllMail bool,
maxSyncMemory uint64,
) (*User, error) { //nolint:funlen
logrus.WithField("userID", apiUser.ID).Info("Creating new user")
@ -141,6 +144,8 @@ func New(
pollAPIEventsCh: make(chan chan struct{}),
showAllMail: b32(showAllMail),
maxSyncMemory: maxSyncMemory,
}
// Initialize the user's update channels for its current address mode.