idgen

package
v2.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// URLFilterSeparator is filter separator for url.
	URLFilterSeparator = "&"
)

Variables

This section is empty.

Functions

func HostIDV1 added in v2.0.9

func HostIDV1(hostname string, port int32) string

HostIDV1 generates v1 version of host id.

func HostIDV2 added in v2.0.9

func HostIDV2(ip, hostname string) string

HostIDV2 generates v2 version of host id.

func ParentTaskIDV1 added in v2.0.9

func ParentTaskIDV1(url string, meta *commonv1.UrlMeta) string

ParentTaskIDV1 generates v1 version of parent task id, but without range. this func is used to check the parent tasks for ranged requests

func PeerIDV1 added in v2.0.9

func PeerIDV1(ip string) string

PeerIDV1 generates v1 version of peer id.

func PeerIDV2 added in v2.0.9

func PeerIDV2() string

PeerIDV2 generates v2 version of peer id.

func SeedPeerIDV1 added in v2.0.9

func SeedPeerIDV1(ip string) string

SeedPeerIDV1 generates v1 version of seed peer id.

func TaskIDV1 added in v2.0.9

func TaskIDV1(url string, meta *commonv1.UrlMeta) string

TaskIDV1 generates v1 version of task id. filter is separated by & character.

func TaskIDV2 added in v2.0.9

func TaskIDV2(url, digest, tag, application string, pieceLength int32, filters []string) string

TaskIDV2 generates v2 version of task id.

Types

This section is empty.

Jump to

Keyboard shortcuts

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