point

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MinTag = PointTag{
		Priority:  common.UInt32Min,
		ReplicaID: 0,
		Nonce:     1,
	}
	MidTag = PointTag{
		Priority:  common.UInt32Mid,
		ReplicaID: 0,
		Nonce:     3,
	}
	MaxTag = PointTag{
		Priority:  common.UInt32Max,
		ReplicaID: 0,
		Nonce:     2,
	}
)

Functions

This section is empty.

Types

type Point

type Point []PointTag

assuming no empty case

func (Point) Clone

func (p Point) Clone() Point

func (Point) Compare

func (p Point) Compare(other Point) common.Order

func (Point) CompareBase

func (p Point) CompareBase(other Point) common.Order

func (Point) Depth

func (p Point) Depth() int

func (Point) DistanceFrom

func (p Point) DistanceFrom(other Point) (uint32, common.Order, error)

func (Point) Equals

func (p Point) Equals(other Point) bool

func (Point) Nonce

func (p Point) Nonce() uint32

func (Point) Offset

func (p Point) Offset(offset uint32) Point

func (Point) ReplicaID

func (p Point) ReplicaID() common.ReplicaID

func (Point) WithNonce

func (p Point) WithNonce(nonce common.Nonce) Point

type PointTag

type PointTag struct {
	Priority  common.Priority
	ReplicaID common.ReplicaID
	Nonce     common.Nonce
}

func (*PointTag) Compare

func (pt *PointTag) Compare(other PointTag) common.Order

func (*PointTag) CompareBase

func (pt *PointTag) CompareBase(other PointTag) common.Order

func (PointTag) MarshalJSON

func (pt PointTag) MarshalJSON() ([]byte, error)

func (*PointTag) UnmarshalJSON

func (pt *PointTag) UnmarshalJSON(data []byte) error

func (*PointTag) WithNonce

func (pt *PointTag) WithNonce(nonce uint32) PointTag

Jump to

Keyboard shortcuts

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