catalog

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: BSD-3-Clause Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catalogs added in v0.0.2

func Catalogs() []string

func RegisterCatalog added in v0.0.2

func RegisterCatalog(ctx context.Context, scheme string, init_func CatalogInitializationFunc) error

Types

type Catalog added in v0.0.2

type Catalog interface {
	Load(string) (interface{}, bool)
	LoadOrStore(string, interface{}) (interface{}, bool)
	Delete(string)
	Range(func(key, value interface{}) bool) error
	Count() int32
}

func NewCatalog added in v0.0.2

func NewCatalog(ctx context.Context, uri string) (Catalog, error)

func NewSyncMapCatalog

func NewSyncMapCatalog(ctx context.Context, uri string) (Catalog, error)

type CatalogInitializationFunc added in v0.0.2

type CatalogInitializationFunc func(ctx context.Context, uri string) (Catalog, error)

type SyncMapCatalog

type SyncMapCatalog struct {
	Catalog
	// contains filtered or unexported fields
}

func (*SyncMapCatalog) Count

func (m *SyncMapCatalog) Count() int32

func (*SyncMapCatalog) Delete

func (m *SyncMapCatalog) Delete(key string)

func (*SyncMapCatalog) Load

func (m *SyncMapCatalog) Load(k string) (interface{}, bool)

func (*SyncMapCatalog) LoadOrStore

func (m *SyncMapCatalog) LoadOrStore(key string, value interface{}) (interface{}, bool)

func (*SyncMapCatalog) Range

func (m *SyncMapCatalog) Range(f func(key, value interface{}) bool) error

Jump to

Keyboard shortcuts

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