mirror of
https://github.com/openziti/zrok.git
synced 2025-08-09 00:04:43 +02:00
share action skeletons (#276)
This commit is contained in:
21
controller/limits/shareLimitAction.go
Normal file
21
controller/limits/shareLimitAction.go
Normal file
@ -0,0 +1,21 @@
|
||||
package limits
|
||||
|
||||
import (
|
||||
"github.com/openziti/edge/rest_management_api_client"
|
||||
"github.com/openziti/zrok/controller/store"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type shareLimitAction struct {
|
||||
str *store.Store
|
||||
edge *rest_management_api_client.ZitiEdgeManagement
|
||||
}
|
||||
|
||||
func newShareLimitAction(str *store.Store, edge *rest_management_api_client.ZitiEdgeManagement) *shareLimitAction {
|
||||
return &shareLimitAction{str, edge}
|
||||
}
|
||||
|
||||
func (a *shareLimitAction) HandleShare(s *store.Share, rxBytes, txBytes int64, limit *BandwidthPerPeriod) error {
|
||||
logrus.Infof("limiting '%v'", s.Token)
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user