open-vault/vault/quotas/quotas_util.go
Scott Miller 0f6543fb41
Upgrade go-limiter to fix building on 1.17 (#12358)
* Upgrade go-limiter

* Modify quota system to pass contexts to upgraded go-limiter

* One more spot

* Add context vars to unit tests

* missed one
2021-09-01 16:28:47 -05:00

66 lines
1.2 KiB
Go

// +build !enterprise
package quotas
import (
"context"
log "github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/helper/metricsutil"
memdb "github.com/hashicorp/go-memdb"
)
func quotaTypes() []string {
return []string{
TypeRateLimit.String(),
}
}
func (m *Manager) init(walkFunc leaseWalkFunc) {}
func (m *Manager) recomputeLeaseCounts(ctx context.Context, txn *memdb.Txn) error {
return nil
}
func (m *Manager) setIsPerfStandby(quota Quota) {}
func (m *Manager) inLeasePathCache(path string) bool {
return false
}
type entManager struct {
isPerfStandby bool
isDRSecondary bool
}
func (*entManager) Reset() error {
return nil
}
type LeaseCountQuota struct{}
func (l LeaseCountQuota) allow(_ context.Context, _ *Request) (Response, error) {
panic("implement me")
}
func (l LeaseCountQuota) quotaID() string {
panic("implement me")
}
func (l LeaseCountQuota) QuotaName() string {
panic("implement me")
}
func (l LeaseCountQuota) initialize(logger log.Logger, sink *metricsutil.ClusterMetricSink) error {
panic("implement me")
}
func (l LeaseCountQuota) close(_ context.Context) error {
panic("implement me")
}
func (l LeaseCountQuota) handleRemount(s string) {
panic("implement me")
}