Documentation
¶
Index ¶
- type FrameLifecycleHandler
- type FrameLifecycleHandlerOption
- type FrameLifecycleHandlerOptions
- type PersistentState
- func (ps *PersistentState) EndFrame()
- func (ps *PersistentState) GetState(id string, initial func() any, options ...state.StateOption) state.MutableValue
- func (ps *PersistentState) SetOnStateChange(callback func())deprecated
- func (ps *PersistentState) StartFrame()
- func (ps *PersistentState) Subscribe(callback func()) state.Subscription
- type PersistentStateInterface
- type PersistentStateOption
- type PersistentStateOptions
- type ScopedValue
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 any)
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 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(scopes map[string]state.MutableValue, options ...PersistentStateOption) PersistentStateInterface
type PersistentStateOption ¶ added in v0.1.91
type PersistentStateOption func(*PersistentStateOptions)
func WithDebugMode ¶ added in v0.1.91
func WithDebugMode() 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
type PersistentStateOptions ¶ added in v0.1.91
type ScopedValue ¶ added in v0.1.91
type ScopedValue struct {
// contains filtered or unexported fields
}
func NewScopedValue ¶ added in v0.1.91
func NewScopedValue( cancelFunc context.CancelFunc, onForgotten func(), onCleared func(), ) ScopedValue
func (ScopedValue) Cleanup ¶ added in v0.1.91
func (sv ScopedValue) Cleanup()
Click to show internal directories.
Click to hide internal directories.