- For OpenSUSE, install the RPM package from CLoudflare for CentOS using zypper. When asked, type
2
. - For Fedora, not tested yet
Copy warp-svc.service
file to /etc/systemd/system/
, then enable in systemd using this command:
package storages | |
import ( | |
"context" | |
"math/rand" | |
"testing" | |
"github.com/golang/mock/gomock" | |
"github.com/google/uuid" | |
"github.com/illiafox/saga-shop/api/apptrace" |
func (s balanceStorage) ChangeBalance(ctx context.Context, userID int64, amount int64, desc string) error { | |
// acquire connection | |
c, err := s.pool.Acquire(ctx) | |
if err != nil { | |
return errors.NewInternal(err, "acquire connection") | |
} | |
defer c.Release() | |
// begin transaction | |
tx, err := c.Begin(ctx) |