Documentation ¶
Overview ¶
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
Index ¶
- Variables
- func CallMethod(i any, methodName string) any
- func Caller(steps int) string
- func CheckClockDrift() (bool, error)
- func CheckSign(publicKeys [][]byte, forSign []byte, signs []byte, nodeKeyOrLogin bool) (bool, error)
- func CopyFileContents(src, dst string) error
- func CreateDirIfNotExists(dir string, mode os.FileMode) error
- func ErrInfo(verr any, additionally ...string) error
- func ErrInfoFmt(err string, a ...any) error
- func GetCurrentDir() string
- func GetHTTPTextAnswer(url string) (string, error)
- func GetHostPort(h string) string
- func GetNodeKeys() (string, string)
- func GetNodePrivateKey() ([]byte, error)
- func GetParent() string
- func IsBanError(err error) bool
- func LockOrDie(dir string) *flock.Flock
- func MakeDirectory(dir string) error
- func ShellExecute(cmdline string)
- func ShuffleSlice(slice []string)
- func StringInSlice(slice []string, v string) bool
- func ToSnakeCase(s string) string
- func UUID() string
- func WithBan(err error) error
- type BanError
- type Clock
- type ClockWrapper
- type MockClock
Constants ¶
This section is empty.
Variables ¶
var ( // ReturnCh is chan for returns ReturnCh chan string // CancelFunc is represents cancel func CancelFunc context.CancelFunc // DaemonsCount is number of daemons DaemonsCount int )
Functions ¶
func CallMethod ¶
CallMethod calls the function by its name
func CheckClockDrift ¶
checkClockDrift queries an NTP server for clock drifts and warns the user if one large enough is detected.
func CheckSign ¶
func CheckSign(publicKeys [][]byte, forSign []byte, signs []byte, nodeKeyOrLogin bool) (bool, error)
CheckSign checks the signature
func GetHTTPTextAnswer ¶
GetHTTPTextAnswer returns HTTP answer as a string
func GetHostPort ¶
func GetNodeKeys ¶
GetNodeKeys returns node private key and public key
func GetNodePrivateKey ¶
func GetParent ¶
func GetParent() string
GetParent returns the information where the call of function happened
func IsBanError ¶
func MakeDirectory ¶
MakeDirectory makes directory if is not exists
func ShuffleSlice ¶
func ShuffleSlice(slice []string)