setstore

package
v0.0.0-...-d9a74f6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: Apache-2.0, MIT Imports: 4 Imported by: 4

Documentation

Overview

Interface for simple sets of strings, with fast inclusion checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemSetStore

type MemSetStore struct {
	Sets map[string]map[string]bool
}

TODO: this implementation isn't race-safe (yet)!

func NewMemSetStore

func NewMemSetStore() MemSetStore

func (MemSetStore) InSet

func (s MemSetStore) InSet(ctx context.Context, name, val string) (bool, error)

func (*MemSetStore) LoadFromFileJSON

func (s *MemSetStore) LoadFromFileJSON(p string) error

type SetStore

type SetStore interface {
	InSet(ctx context.Context, name, val string) (bool, error)
}

Jump to

Keyboard shortcuts

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