Documentation ¶
Index ¶
- Variables
- type Spiral
- func (r Spiral) Compare(b Spiral, maxSteps int) (int, error)
- func (r *Spiral) Copy() *Spiral
- func (r Spiral) Encode() string
- func (r Spiral) Equal(b Spiral) bool
- func (r *Spiral) Inc()
- func (r *Spiral) IncBy(n int)
- func (r Spiral) Key() [32]byte
- func (r Spiral) KnownAfter(b Spiral) bool
- func (r Spiral) Previous(old *Spiral, limit int) ([]*Spiral, error)
- func (r Spiral) PreviousBudget(old *Spiral, discrepencyBudget, limit int) ([]*Spiral, error)
- func (r Spiral) Summary() string
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRatchetNotFound = fmt.Errorf("ratchet not found")
View Source
var ErrUnknownRatchetRelation = fmt.Errorf("cannot relate ratchets")
Functions ¶
This section is empty.
Types ¶
type Spiral ¶
type Spiral struct {
// contains filtered or unexported fields
}
func DecodeSpiral ¶
func (Spiral) KnownAfter ¶
KnownAfter is probabilistic. Returns true if r is known to be after b, and false if large counters are inequal (meaning r is before, equal, unrelated, or after)
func (Spiral) PreviousBudget ¶
type Store ¶
type Store interface { PutRatchet(ctx context.Context, name string, ratchet *Spiral) (updated bool, err error) OldestKnownRatchet(ctx context.Context, name string) (*Spiral, error) ForEach(ctx context.Context, visit func(name string, ratchet *Spiral) error) error Flush() error }
func NewMemStore ¶
Click to show internal directories.
Click to hide internal directories.