basic

package
v0.0.0-...-42ee62e Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastKBucket

func CastKBucket(nodes *[]NodeInfo) *pb.KBucket

func ClosestNodeToKey

func ClosestNodeToKey(key []byte, id1 []byte, id2 []byte) int

func NewID

func NewID(ip string, port int) ([]byte, error)

Types

type NodeInfo

type NodeInfo struct {
	ID   []byte `json:"id,omitempty"`
	IP   string `json:"ip,omitempty"`
	Port int    `json:"port,omitempty"`
}

func CastPArrayNode

func CastPArrayNode(nodes *[]NodeInfo) []*NodeInfo

func (*NodeInfo) Equal

func (b *NodeInfo) Equal(other NodeInfo) bool

Jump to

Keyboard shortcuts

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