Documentation ¶
Index ¶
- Constants
- func EtcdDelete(clt *clientv3.Client, keyString string) (bool, error)
- func EtcdDeletePrefix(clt *clientv3.Client, prefixString string) (bool, error)
- func EtcdGet(clt *clientv3.Client, keyString string) (string, error)
- func EtcdGetKeysOnly(clt *clientv3.Client, prefixString string) ([]string, error)
- func EtcdGetPrefix(clt *clientv3.Client, prefixString string) ([]map[string]string, error)
- func EtcdPut(clt *clientv3.Client, keyString string, valueString string) (bool, error)
- func EtcdPutWithLeast(clt *clientv3.Client, keyString string, valueString string, t int64) (bool, error)
- func EtcdWatchOnce(clt *clientv3.Client, keyString string) (string, string, string)
- func EtcdWatchPrefixOnce(clt *clientv3.Client, prefixString string) (string, string, string)
- func MysqlExecuteDb(tdb *sql.DB, sqlString string, args ...interface{}) (bool, error)
- func MysqlQueryDb(tdb *sql.DB, sqlString string, args ...interface{}) ([]map[string]string, error)
- type EtcdConn
- type MysqlConn
Constants ¶
View Source
const ( MYSQL_DRIVER = "mysql" NONE int64 = 0 )
View Source
const ETCD_TIMEOUT = 3
Variables ¶
This section is empty.
Functions ¶
func EtcdDelete ¶
Delete a key
func EtcdDeletePrefix ¶
Delelte all keys with prefix
func EtcdGetKeysOnly ¶
Get all keys with prefix
func EtcdGetPrefix ¶
Get values of all keys with prefix
func EtcdPutWithLeast ¶
func EtcdPutWithLeast(clt *clientv3.Client, keyString string, valueString string, t int64) (bool, error)
Put value to a key with TTL
func EtcdWatchOnce ¶
Watch a key once
func EtcdWatchPrefixOnce ¶
Watch all keys with prefix
func MysqlExecuteDb ¶
Write to db, return number of rows
Types ¶
Click to show internal directories.
Click to hide internal directories.