Versions in this module Expand all Collapse all v1 v1.0.0 Sep 14, 2024 v0 v0.1.0 Sep 14, 2024 Changes in this version + const ConvTypeHex + const ConvTypeRaw + const MatchContains + const MatchEndsWith + const MatchEqual + const MatchHex + const MatchNotContains + const MatchNotEndsWith + const MatchNotEqual + const MatchNotStartsWith + const MatchRegex + const MatchStartsWith + const MatchWildcard + var EncodingMaps map[string]encoding.Encoding + var ErrScriptTimeout = fmt.Errorf("run script timeout") + func AssemblePipes(cmds []*exec.Cmd, stdin io.Reader, stdout io.Writer) []*exec.Cmd + func AssemblePipesWithoutErr(cmds []*exec.Cmd, stdin io.Reader, stdout io.Writer) []*exec.Cmd + func CleanCompositeParamList(configs ...define.CompositeParam) error + func ClearTempFile(pattern string) error + func ConvertHexStringToBytes(data string) ([]byte, error) + func ConvertStringToBytes(data string, typ string) ([]byte, error) + func CreateTempFile(pattern string) (*os.File, error) + func FilterIpsWithIpType(ips []string, ipType DomainType) []string + func GeneratorHashKey(names []string) string + func GetDurationSecondsSince(t time.Time) float64 + func GetPtrByName(object interface{}, attr string) (interface{}, bool) + func GetRootDevices() (int64, int64, error) + func GetValueByName(object interface{}, attr string) (reflect.Value, bool) + func HasTempDir() bool + func HashIt(object interface{}) string + func InitTempDir(clear bool) (string, error) + func IsLinuxOS() bool + func IsMatch(matchType string, content []byte, expect []byte) bool + func IsMatchString(matchType string, content string, expect string) bool + func NewDecoder(name string) *encoding.Decoder + func NewEncoder(name string) *encoding.Encoder + func ParseCmdline2Cmds(cmdline string, userEnvs map[string]string) ([][]string, error) + func PathExist(path string) bool + func PidStoreFile() string + func ReadFileTail(p string, size int64) ([]byte, error) + func RealReflectValue(v reflect.Value) reflect.Value + func RecoverFor(fn func(error)) + func RunCmds(cmds []*exec.Cmd, notify chan error) + func RunString(ctx context.Context, s string, userEnvs map[string]string) (string, error) + func RunStringWithoutErr(ctx context.Context, s string, userEnvs map[string]string) (string, error) + func SafeReflectValueAddrInterface(v reflect.Value) interface + func SafeReflectValueInterface(v reflect.Value) interface + func SetLinuxCGroup(name string, blockIO SpecBlockIO) error + func WildcardToRegex(pattern string) string + type Atomic struct + func (a *Atomic) Run(f AtomicFunc) + type AtomicFunc func() + type DomainType int32 + const Domain + const V4 + const V6 + func CheckIpOrDomainValid(addr string) DomainType + type GetEnver struct + func (ge *GetEnver) GetEnv(key string) string + type HookFunction func(ctx context.Context) + type HookManager struct + func (m *HookManager) Add(hook HookFunction) + func (m *HookManager) Apply(ctx context.Context) + type RpmResult struct + Package string + Verify string + func RpmVerify(ctx context.Context) ([]RpmResult, error) + type SpecBlockIO struct + Major int64 + Minor int64 + ReadBytes uint64 + ReadIOps uint64 + WriteBytes uint64 + WriteIOps uint64