Documentation ¶
Overview ¶
etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 https://skyao.gitbooks.io/learning-etcd3/content/documentation/op-guide/configuration.html#--advertise-client-urls https://etcd.readthedocs.io/en/latest/
Index ¶
- Variables
- func CheckRegisted() bool
- func DELETEEtcd(c *gin.Context)
- func Delete(key string) error
- func Get(key string) (string, error)
- func GetByPrefix(prefix string) (*[]KV, error)
- func GetEtcd(c *gin.Context)
- func GetEtcds(c *gin.Context)
- func GetString(key string) (string, error)
- func PUTEtcd(c *gin.Context)
- func Put(key string, value string) error
- func PutKey(key, val string) error
- func Register()
- func RegisterSelf()
- type DELETEEtcdForm
- type EtcdClient
- type GetEtcdFrom
- type KV
- type PUTEtcdFrom
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KEY_URL = "116.62.230.114:2379" GR_URL = "47.110.8.212:2379" GR_URL2 = "47.110.8.212:2479" )
View Source
var EtcdPrefix = "/xiao/116.62.230.114/9001"
EtcdPrefix 当前应用配置的前缀
Functions ¶
func DELETEEtcd ¶ added in v0.0.11
func GetByPrefix ¶ added in v0.0.11
Types ¶
type DELETEEtcdForm ¶ added in v0.0.11
type DELETEEtcdForm struct {
Key string `json:"key" binding:'required'`
}
type EtcdClient ¶ added in v0.0.11
type EtcdClient struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.0.11
func New() *EtcdClient
func (*EtcdClient) Delete ¶ added in v0.0.11
func (c *EtcdClient) Delete(key string) error
func (*EtcdClient) Get ¶ added in v0.0.11
func (c *EtcdClient) Get(key string) (string, error)
Get 获取值
func (*EtcdClient) GetByPrefix ¶ added in v0.0.11
func (c *EtcdClient) GetByPrefix(prefix string) (*[]KV, error)
GetByPrefix 通过前缀获取值
type GetEtcdFrom ¶ added in v0.0.11
type GetEtcdFrom struct {
Key string `form:"key"`
}
type PUTEtcdFrom ¶ added in v0.0.11
Click to show internal directories.
Click to hide internal directories.