add trx to action interfaces; implement limit and relax for share (#276)

This commit is contained in:
Michael Quigley
2023-03-27 13:51:48 -04:00
committed by Kenneth Bingham
parent bf48ddec76
commit 427ef7e3f9
12 changed files with 72 additions and 22 deletions

View File

@ -1,6 +1,7 @@
package limits
import (
"github.com/jmoiron/sqlx"
"github.com/openziti/edge/rest_management_api_client"
"github.com/openziti/zrok/controller/store"
"github.com/sirupsen/logrus"
@ -15,7 +16,7 @@ func newShareWarningAction(str *store.Store, edge *rest_management_api_client.Zi
return &shareWarningAction{str, edge}
}
func (a *shareWarningAction) HandleShare(s *store.Share, rxBytes, txBytes int64, limit *BandwidthPerPeriod) error {
func (a *shareWarningAction) HandleShare(s *store.Share, rxBytes, txBytes int64, limit *BandwidthPerPeriod, trx *sqlx.Tx) error {
logrus.Infof("warning '%v'", s.Token)
return nil
}