2023-03-27 17:43:58 +02:00
|
|
|
package limits
|
|
|
|
|
|
|
|
import (
|
2023-03-27 19:51:48 +02:00
|
|
|
"github.com/jmoiron/sqlx"
|
2023-03-27 17:43:58 +02:00
|
|
|
"github.com/openziti/edge/rest_management_api_client"
|
|
|
|
"github.com/openziti/zrok/controller/store"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
type environmentWarningAction struct {
|
|
|
|
str *store.Store
|
|
|
|
edge *rest_management_api_client.ZitiEdgeManagement
|
|
|
|
}
|
|
|
|
|
|
|
|
func newEnvironmentWarningAction(str *store.Store, edge *rest_management_api_client.ZitiEdgeManagement) *environmentWarningAction {
|
|
|
|
return &environmentWarningAction{str, edge}
|
|
|
|
}
|
|
|
|
|
2023-03-27 19:51:48 +02:00
|
|
|
func (a *environmentWarningAction) HandleEnvironment(e *store.Environment, rxBytes, txBytes int64, limit *BandwidthPerPeriod, trx *sqlx.Tx) error {
|
2023-03-27 17:43:58 +02:00
|
|
|
logrus.Infof("warning '%v'", e.ZId)
|
|
|
|
return nil
|
|
|
|
}
|