Documentation
¶
Index ¶
- type WrapAround
- func (w *WrapAround[T, ET]) GetExtendedHighest() ET
- func (w *WrapAround[T, ET]) GetExtendedStart() ET
- func (w *WrapAround[T, ET]) GetHighest() T
- func (w *WrapAround[T, ET]) GetStart() T
- func (w *WrapAround[T, ET]) MarshalLogObject(e zapcore.ObjectEncoder) error
- func (w *WrapAround[T, ET]) ResetHighest(ev ET)
- func (w *WrapAround[T, ET]) RollbackRestart(ev ET)
- func (w *WrapAround[T, ET]) Rollover(val T, numCycles int) (result WrapAroundUpdateResult[ET])
- func (w *WrapAround[T, ET]) Seed(from *WrapAround[T, ET])
- func (w *WrapAround[T, ET]) UndoUpdate(result WrapAroundUpdateResult[ET])
- func (w *WrapAround[T, ET]) Update(val T) (result WrapAroundUpdateResult[ET])
- func (w *WrapAround[T, ET]) UpdateWithOrderKnown(val T, orderKnown bool) (result WrapAroundUpdateResult[ET])
- type WrapAroundParams
- type WrapAroundUpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WrapAround ¶
type WrapAround[T number, ET extendedNumber] struct {
// contains filtered or unexported fields
}
func NewWrapAround ¶
func NewWrapAround[T number, ET extendedNumber](params WrapAroundParams) *WrapAround[T, ET]
func (*WrapAround[T, ET]) GetExtendedHighest ¶
func (w *WrapAround[T, ET]) GetExtendedHighest() ET
func (*WrapAround[T, ET]) GetExtendedStart ¶
func (w *WrapAround[T, ET]) GetExtendedStart() ET
func (*WrapAround[T, ET]) GetHighest ¶
func (w *WrapAround[T, ET]) GetHighest() T
func (*WrapAround[T, ET]) GetStart ¶
func (w *WrapAround[T, ET]) GetStart() T
func (*WrapAround[T, ET]) MarshalLogObject ¶
func (w *WrapAround[T, ET]) MarshalLogObject(e zapcore.ObjectEncoder) error
func (*WrapAround[T, ET]) ResetHighest ¶
func (w *WrapAround[T, ET]) ResetHighest(ev ET)
func (*WrapAround[T, ET]) RollbackRestart ¶
func (w *WrapAround[T, ET]) RollbackRestart(ev ET)
func (*WrapAround[T, ET]) Rollover ¶
func (w *WrapAround[T, ET]) Rollover(val T, numCycles int) (result WrapAroundUpdateResult[ET])
func (*WrapAround[T, ET]) Seed ¶
func (w *WrapAround[T, ET]) Seed(from *WrapAround[T, ET])
func (*WrapAround[T, ET]) UndoUpdate ¶
func (w *WrapAround[T, ET]) UndoUpdate(result WrapAroundUpdateResult[ET])
func (*WrapAround[T, ET]) Update ¶
func (w *WrapAround[T, ET]) Update(val T) (result WrapAroundUpdateResult[ET])
func (*WrapAround[T, ET]) UpdateWithOrderKnown ¶
func (w *WrapAround[T, ET]) UpdateWithOrderKnown(val T, orderKnown bool) (result WrapAroundUpdateResult[ET])
type WrapAroundParams ¶
type WrapAroundParams struct {
IsRestartAllowed bool
}
type WrapAroundUpdateResult ¶
type WrapAroundUpdateResult[ET extendedNumber] struct {
IsUnhandled bool // when set, other fields are invalid
IsRestart bool
PreExtendedStart ET // valid only if IsRestart = true
PreExtendedHighest ET
ExtendedVal ET
}
func (*WrapAroundUpdateResult[ET]) MarshalLogObject ¶
func (w *WrapAroundUpdateResult[ET]) MarshalLogObject(e zapcore.ObjectEncoder) error
Click to show internal directories.
Click to hide internal directories.