1
0

GODT-1913: pass reporter to gluon, limit restarts, add crash handlers.

This commit is contained in:
Jakub
2022-10-21 18:41:31 +02:00
committed by James Houlahan
parent 31fb878bbd
commit ae87d7b236
28 changed files with 811 additions and 34 deletions

View File

@ -101,6 +101,10 @@ func (bridge *Bridge) QueryUserInfo(query string) (UserInfo, error) {
func (bridge *Bridge) LoginAuth(ctx context.Context, username string, password []byte) (*liteapi.Client, liteapi.Auth, error) {
logrus.WithField("username", logging.Sensitive(username)).Info("Authorizing user for login")
if username == "crash@bandicoot" {
panic("Your wish is my command.. I crash!")
}
client, auth, err := bridge.api.NewClientWithLogin(ctx, username, password)
if err != nil {
return nil, liteapi.Auth{}, fmt.Errorf("failed to create new API client: %w", err)
@ -415,6 +419,8 @@ func (bridge *Bridge) addUserWithVault(
vault,
client,
apiUser,
bridge.crashHandler,
bridge.reporter,
bridge.vault.SyncWorkers(),
bridge.vault.SyncBuffer(),
bridge.vault.GetShowAllMail(),