sorting

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sorting includes utilities for ordering slices of Entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(a, b iface.IPFSLogEntry) (int, error)

func First

func First(_, _ iface.IPFSLogEntry) (int, error)

func FirstWriteWins

func FirstWriteWins(a, b iface.IPFSLogEntry) (int, error)

func LastWriteWins

func LastWriteWins(a, b iface.IPFSLogEntry) (int, error)

func NoZeroes

func NoZeroes(compFunc func(a, b iface.IPFSLogEntry) (int, error)) func(a, b iface.IPFSLogEntry) (int, error)

func Reverse

func Reverse(a []iface.IPFSLogEntry)

func Sort

func Sort(compFunc func(a, b iface.IPFSLogEntry) (int, error), values []iface.IPFSLogEntry, reverse bool)

func SortByClockID

func SortByClockID(a, b iface.IPFSLogEntry, resolveConflict func(a iface.IPFSLogEntry, b iface.IPFSLogEntry) (int, error)) (int, error)

func SortByClocks

func SortByClocks(a, b iface.IPFSLogEntry, resolveConflict func(a iface.IPFSLogEntry, b iface.IPFSLogEntry) (int, error)) (int, error)

func SortByEntryHash added in v1.1.0

func SortByEntryHash(a, b iface.IPFSLogEntry) (int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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