local

package
v0.0.0-...-a47d1aa Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dir string `yaml:"dir"`
}

func (*Config) RegisterFlagsWithPrefix

func (c *Config) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix string)

type Storage

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

func NewStorage

func NewStorage(cfg Config, logger log.Logger) (*Storage, error)

func (*Storage) Alloc

func (s *Storage) Alloc(_ context.Context, namespace, resource string, tokens, version int64) (int64, int64, bool, error)

func (*Storage) Free

func (s *Storage) Free(_ context.Context, namespace, resource string, tokens, version int64) (int64, int64, bool, error)

func (*Storage) RegisterQuota

func (s *Storage) RegisterQuota(_ context.Context, namespace, resource string, cfg quota.Config) error

func (*Storage) Shutdown

func (s *Storage) Shutdown(_ context.Context) error

func (*Storage) View

func (s *Storage) View(_ context.Context, namespace, resource string) (int64, int64, int64, error)

Jump to

Keyboard shortcuts

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