Documentation ¶
Index ¶
- type HeightView
- type State
- func (s *State) GcOldContexts()
- func (s *State) Height() primitives.BlockHeight
- func (s *State) HeightView() *HeightView
- func (s *State) SetHeightAndResetView(newHeight primitives.BlockHeight) (*HeightView, error)
- func (s *State) SetHeightView(ctx context.Context, newHeight primitives.BlockHeight, newView primitives.View) (*HeightView, error)
- func (s *State) SetView(newView primitives.View) (*HeightView, error)
- func (s *State) View() primitives.View
- type ViewContexts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeightView ¶
type HeightView struct {
// contains filtered or unexported fields
}
Immutable instance of height+view
func NewHeightView ¶
func NewHeightView(h primitives.BlockHeight, v primitives.View) *HeightView
func (*HeightView) Height ¶
func (hv *HeightView) Height() primitives.BlockHeight
func (*HeightView) OlderThan ¶ added in v0.2.4
func (hv *HeightView) OlderThan(otherHv *HeightView) bool
func (*HeightView) String ¶
func (hv *HeightView) String() string
func (*HeightView) View ¶
func (hv *HeightView) View() primitives.View
type State ¶
type State struct { sync.RWMutex Contexts *ViewContexts // contains filtered or unexported fields }
Mutable, goroutine-safe State object
func (*State) GcOldContexts ¶ added in v0.2.4
func (s *State) GcOldContexts()
func (*State) Height ¶
func (s *State) Height() primitives.BlockHeight
func (*State) HeightView ¶
func (s *State) HeightView() *HeightView
func (*State) SetHeightAndResetView ¶
func (s *State) SetHeightAndResetView(newHeight primitives.BlockHeight) (*HeightView, error)
func (*State) SetHeightView ¶
func (s *State) SetHeightView(ctx context.Context, newHeight primitives.BlockHeight, newView primitives.View) (*HeightView, error)
TODO For testing only, so perhaps move it away
func (*State) SetView ¶
func (s *State) SetView(newView primitives.View) (*HeightView, error)
func (*State) View ¶
func (s *State) View() primitives.View
type ViewContexts ¶ added in v0.2.4
type ViewContexts struct {
// contains filtered or unexported fields
}
func NewViewContexts ¶ added in v0.2.4
func NewViewContexts() *ViewContexts
func (*ViewContexts) CancelOlderThan ¶ added in v0.2.4
func (w *ViewContexts) CancelOlderThan(hv *HeightView)
func (*ViewContexts) For ¶ added in v0.2.4
func (w *ViewContexts) For(hv *HeightView) (context.Context, error)
func (*ViewContexts) Shutdown ¶ added in v0.2.4
func (w *ViewContexts) Shutdown()
Click to show internal directories.
Click to hide internal directories.