store

package
v0.1.113 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrameLifecycleHandler added in v0.1.91

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

func NewFrameLifecycleHandler added in v0.1.91

func NewFrameLifecycleHandler(options ...FrameLifecycleHandlerOption) *FrameLifecycleHandler

func (*FrameLifecycleHandler) AttachValueToLifecycle added in v0.1.91

func (flh *FrameLifecycleHandler) AttachValueToLifecycle(key string, value state.MutableValue)

func (*FrameLifecycleHandler) EndFrame added in v0.1.91

func (flh *FrameLifecycleHandler) EndFrame() []string

return keys to remove

func (*FrameLifecycleHandler) Ping added in v0.1.91

func (flh *FrameLifecycleHandler) Ping(key string)

func (*FrameLifecycleHandler) StartFrame added in v0.1.91

func (flh *FrameLifecycleHandler) StartFrame()

type FrameLifecycleHandlerOption added in v0.1.91

type FrameLifecycleHandlerOption func(*FrameLifecycleHandlerOptions)

func WithLifecycleDebugMode added in v0.1.91

func WithLifecycleDebugMode(debugMode bool) FrameLifecycleHandlerOption

func WithLifecycleRootContext added in v0.1.91

func WithLifecycleRootContext(rootContext context.Context) FrameLifecycleHandlerOption

func WithLifecycleTriggerReceivers added in v0.1.91

func WithLifecycleTriggerReceivers(
	startFrameTriggerReceiver func(trigger func()),
	endFrameTriggerReceiver func(trigger func() []string),
) FrameLifecycleHandlerOption

type FrameLifecycleHandlerOptions added in v0.1.91

type FrameLifecycleHandlerOptions struct {
	StartFrameTriggerReceiver func(trigger func())
	EndFrameTriggerReceiver   func(trigger func() []string)
	RootContext               context.Context
	DebugMode                 bool
}

type PersistentState

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

func (*PersistentState) EndFrame added in v0.1.91

func (ps *PersistentState) EndFrame()

func (*PersistentState) GetState

func (ps *PersistentState) GetState(id string, initial func() any, options ...state.StateOption) state.MutableValue

func (*PersistentState) SetOnStateChange deprecated

func (ps *PersistentState) SetOnStateChange(callback func())

Deprecated: use Subscribe instead

func (*PersistentState) StartFrame added in v0.1.91

func (ps *PersistentState) StartFrame()

func (*PersistentState) Subscribe added in v0.1.91

func (ps *PersistentState) Subscribe(callback func()) state.Subscription

type PersistentStateInterface

type PersistentStateInterface = state.PersistentState

func NewPersistentState

func NewPersistentState(options ...PersistentStateOption) PersistentStateInterface

type PersistentStateOption added in v0.1.91

type PersistentStateOption func(*PersistentStateOptions)

func WithDebugMode added in v0.1.91

func WithDebugMode(debugMode bool) PersistentStateOption

func WithFrameLifecycleTriggerReceivers added in v0.1.91

func WithFrameLifecycleTriggerReceivers(
	startFrameTriggerReceiver func(trigger func()),
	endFrameTriggerReceiver func(trigger func() []string),
) PersistentStateOption

func WithRootContext added in v0.1.91

func WithRootContext(rootContext context.Context) PersistentStateOption

func WithStorage added in v0.1.94

func WithStorage(storage map[string]state.MutableValue) PersistentStateOption

type PersistentStateOptions added in v0.1.91

type PersistentStateOptions struct {
	StartFrameTriggerReceiver func(trigger func())
	EndFrameTriggerReceiver   func(trigger func() []string)
	RootContext               context.Context
	DebugMode                 bool

	Storage map[string]state.MutableValue
}

type ScopedValue added in v0.1.91

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

func NewScopedValue added in v0.1.91

func NewScopedValue(
	cancelFuncs []context.CancelFunc,
	onForgotten func(),
	onCleared func(),
) ScopedValue

func (ScopedValue) Cleanup added in v0.1.91

func (sv ScopedValue) Cleanup()

Jump to

Keyboard shortcuts

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