global

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const ReservedNodeToken = "reserverd"

Variables

View Source
var HomePath string = GetHomeDir()
View Source
var LocalHostDNSName = "localhost"
View Source
var LocalIPs = QueryIps()
View Source
var LocalPath string = GetCurrentDir()
View Source
var LocalhostIP = net.ParseIP("127.0.0.1")
View Source
var _, NetworkControllerCIDR, _ = net.ParseCIDR("10.1.1.0/24")

Functions

func ABSPath

func ABSPath(path string) string

func CopyFile

func CopyFile(source string, destination string) error

func Exists

func Exists(files ...string) bool

only all files exist return true, other return false

func ExternIp

func ExternIp() string

func GetCurrentDir

func GetCurrentDir() string

func GetDefaultClusterDNSIP

func GetDefaultClusterDNSIP(clusterIpRange *net.IPNet) net.IP

func GetDefaultServiceIp

func GetDefaultServiceIp(clusterIpRange *net.IPNet) net.IP

func GetHomeDir

func GetHomeDir() string

func GetIndexedIP

func GetIndexedIP(subnet *net.IPNet, index int) (net.IP, error)

func NoValueString

func NoValueString(s ...string) bool

func NotExists

func NotExists(files ...string) bool

func QueryIps

func QueryIps() []net.IP

func RemoveRepeatIps

func RemoveRepeatIps(ips []net.IP) []net.IP

func ReplaceCurrent

func ReplaceCurrent(raw []byte) []byte

replace . in path to ABS Path

func ReplaceHome

func ReplaceHome(raw []byte) []byte

replace ~, $HOME in path to ABS Path

Types

This section is empty.

Jump to

Keyboard shortcuts

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