gutil

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

README

gutil

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallScript added in v0.0.3

func CallScript(script string) (string, string, error)

func ConvStr2Prom

func ConvStr2Prom(str string) float64

func GetEnvBool

func GetEnvBool(key string, value bool) bool

func GetEnvInt

func GetEnvInt(key string, value int) int

func GetEnvInt64

func GetEnvInt64(key string, value int64) int64

func GetEnvStr

func GetEnvStr(key string, value string) string

func ProcessExists added in v0.0.4

func ProcessExists(processName string) (bool, error)

Types

type ConfigProperties

type ConfigProperties struct {
	// contains filtered or unexported fields
}

func ConfigPropFromFile added in v0.0.2

func ConfigPropFromFile(file string) (*ConfigProperties, error)

func (*ConfigProperties) Init

func (c *ConfigProperties) Init()

func (*ConfigProperties) Set

func (c *ConfigProperties) Set(key, val string)

func (*ConfigProperties) SetBool added in v0.0.7

func (c *ConfigProperties) SetBool(key string, val bool)

func (*ConfigProperties) SetInt added in v0.0.2

func (c *ConfigProperties) SetInt(key string, val int)

func (*ConfigProperties) SetInt32 added in v0.0.8

func (c *ConfigProperties) SetInt32(key string, val int32)

func (*ConfigProperties) SetInt64 added in v0.0.2

func (c *ConfigProperties) SetInt64(key string, val int64)

func (*ConfigProperties) Write

func (c *ConfigProperties) Write(dstFile string) error

type ConfigYaml added in v0.0.9

type ConfigYaml struct {
	// contains filtered or unexported fields
}

func ConfigYamlFromFile added in v0.0.9

func ConfigYamlFromFile(file string) (*ConfigYaml, error)

func (*ConfigYaml) Init added in v0.0.9

func (c *ConfigYaml) Init()

func (*ConfigYaml) Set added in v0.0.9

func (c *ConfigYaml) Set(key, val string)

func (*ConfigYaml) SetBool added in v0.0.9

func (c *ConfigYaml) SetBool(key string, val bool)

func (*ConfigYaml) SetInt added in v0.0.9

func (c *ConfigYaml) SetInt(key string, val int)

func (*ConfigYaml) SetInt32 added in v0.0.9

func (c *ConfigYaml) SetInt32(key string, val int32)

func (*ConfigYaml) SetInt64 added in v0.0.9

func (c *ConfigYaml) SetInt64(key string, val int64)

func (*ConfigYaml) SetMap added in v0.0.9

func (c *ConfigYaml) SetMap(key string, val map[string]interface{})

func (*ConfigYaml) Write added in v0.0.9

func (c *ConfigYaml) Write(dstFile string) error

type FileContentWatcher added in v0.0.10

type FileContentWatcher struct {
	Content []byte
	RwLock  sync.RWMutex
	// contains filtered or unexported fields
}

type FsStorage added in v0.0.5

type FsStorage struct {
	// contains filtered or unexported fields
}

func NewFsStorage added in v0.0.5

func NewFsStorage(storageDir string) *FsStorage

func (*FsStorage) Add added in v0.0.5

func (f *FsStorage) Add(ns, key string, v interface{}) error

func (*FsStorage) AddNamespace added in v0.0.5

func (f *FsStorage) AddNamespace(namespace string)

func (*FsStorage) Del added in v0.0.5

func (f *FsStorage) Del(ns, key string) error

func (*FsStorage) Get added in v0.0.5

func (f *FsStorage) Get(ns, key string) ([]byte, error)

func (*FsStorage) GetKeyList added in v0.0.5

func (f *FsStorage) GetKeyList(ns string) ([]string, error)

Jump to

Keyboard shortcuts

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