etcdqm

package
v1.3.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Overview

Package etcdqm contains an etcd-based quota.Manager implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager added in v1.3.12

type Manager struct {
	// contains filtered or unexported fields
}

Manager implements a quota manager based on etcd.

func New

func New(client *clientv3.Client) *Manager

New returns a new etcd-based quota.Manager.

func (*Manager) GetTokens added in v1.3.12

func (m *Manager) GetTokens(ctx context.Context, numTokens int, specs []quota.Spec) error

GetTokens implements the quota.Manager API.

func (*Manager) PutTokens added in v1.3.12

func (m *Manager) PutTokens(ctx context.Context, numTokens int, specs []quota.Spec) error

PutTokens implements the quota.Manager API.

func (*Manager) ResetQuota added in v1.3.12

func (m *Manager) ResetQuota(ctx context.Context, specs []quota.Spec) error

ResetQuota implements the quota.Manager API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL