utils

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Type_Redis     = 0
	Service_Type_Memcache  = 1
	Service_Type_Twemproxy = 2
	Service_Type_Mysql     = 3
	Service_Type_Mongodb   = 4
)

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func DiscoverServices

func DiscoverServices() map[int]Service

func FromJSON

func FromJSON(data []byte, v interface{}) (err error)

func GetDefaultInterface

func GetDefaultInterface() string

func GetFirstInterface

func GetFirstInterface() (name string, ip string)

func GetHostIp

func GetHostIp() string

func IP2int

func IP2int(ip string) uint32

func MustParseInt

func MustParseInt(s string) int

func ShowAllInterfaces

func ShowAllInterfaces()

func ToIndentJSON

func ToIndentJSON(v interface{}) byteArray

func ToJSON

func ToJSON(v interface{}) byteArray

Types

type ByLength

type ByLength []string

func (ByLength) Len

func (s ByLength) Len() int

func (ByLength) Less

func (s ByLength) Less(i, j int) bool

func (ByLength) Swap

func (s ByLength) Swap(i, j int)

type Service

type Service struct {
	Port int
	Type int
	Pid  int
}

Jump to

Keyboard shortcuts

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