Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteWithKey ¶ added in v0.1.0
func DeleteWithKey[K comparable](key K) bool
DeleteWithKey removes a key
func Get ¶ added in v0.1.0
func Get[K comparable, V any](key K) (V, bool)
Get retrieves a value with type inference
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func GetSharedStore ¶ added in v0.1.0
func GetSharedStore() *Store
GetSharedStore ensures a single global store instance
type StoreBuilder ¶ added in v0.1.0
type StoreBuilder struct {
// contains filtered or unexported fields
}
StoreBuilder - Allows configuring store before initialization
func NewStoreBuilder ¶ added in v0.1.0
func NewStoreBuilder() *StoreBuilder
NewStoreBuilder creates a new builder
func (*StoreBuilder) Build ¶ added in v0.1.0
func (b *StoreBuilder) Build()
Build sets the configuration and initializes the singleton
func (*StoreBuilder) SetMaxSize ¶ added in v0.1.0
func (b *StoreBuilder) SetMaxSize(size int) *StoreBuilder
SetMaxSize configures the max size
type StoreConfig ¶ added in v0.1.0
type StoreConfig struct {
MaxSize int
}
StoreConfig - Configuration settings for Store
Click to show internal directories.
Click to hide internal directories.