util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAddressStrToSlice

func ConvertAddressStrToSlice(addressStr string) []string

ConvertAddressStrToSlice convert address like "127.0.0.1:2379,127.0.0.1:2380" to endpoints like ["127.0.0.1:2379", "127.0.0.1:2380"]

func GetNearest2Power added in v0.1.0

func GetNearest2Power(old int) int

func GetWorkerIDByIp

func GetWorkerIDByIp() int64

GetWorkerIDByIp use ip low 10 bit to generate workerID

func MaxInt64 added in v0.1.0

func MaxInt64(x, y int64) int64

func ValidateHostPort

func ValidateHostPort(hostPort string) error

ValidateHostPort validate that hostPort is correct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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