Documentation
¶
Index ¶
- func ReadRequestBody(req *http.Request) ([]byte, error)
- func Serve(listen string, zk ZooNode, cors_options CorsOptions)
- type CorsOptions
- type Get
- type GetJSON
- type Ls
- type MC
- type Zk
- type ZooNode
- func (z ZooNode) CreateChild(path string, content []byte) string
- func (z ZooNode) CreateNode(path string, content []byte) string
- func (z ZooNode) EnsureZooPath(path string) (string, error)
- func (zk ZooNode) GET(w http.ResponseWriter, r *http.Request)
- func (z ZooNode) GetChildrens(path string) Ls
- func (zk ZooNode) GetJSON(w http.ResponseWriter, r *http.Request)
- func (z ZooNode) GetNode(path string) Get
- func (zk ZooNode) LS(w http.ResponseWriter, r *http.Request)
- func (zk ZooNode) RM(w http.ResponseWriter, r *http.Request)
- func (z ZooNode) RMR(path string)
- func (zk ZooNode) UP(w http.ResponseWriter, r *http.Request)
- func (z ZooNode) UpdateNode(path string, content []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CorsOptions ¶
type Get ¶
type Get struct {
Path string `json:"path"`
State string `json:"state"`
Error string `json:"error"`
ZkStat *zk.Stat `json:"zkstat"`
Data []byte `json:"data"`
}
Get ...
type Ls ¶
type Ls struct {
Childrens []string `json:"childrens"`
Path string `json:"path"`
State string `json:"state"`
Error string `json:"error"`
ZkStat *zk.Stat `json:"zkstat"`
}
Ls ...
type MC ¶
type MC struct {
Enabled bool `json:"enabled"`
Hosts []string `json:"hosts"`
Prefix string `json:"prefix"`
Client *memcache.Client
}
Memcached connection settings
func (MC) DeleteFromCache ¶
DeleteFromCache delete key from memcache
func (MC) GetFromCache ¶
GetFromCache get node data from memcache
func (MC) InitConnection ¶
InitConnection to memcached cluster
type ZooNode ¶
ZooNode zookeeper node
func (ZooNode) CreateChild ¶
CreateChild create child in /node/path
func (ZooNode) CreateNode ¶
CreateNode ...
func (ZooNode) EnsureZooPath ¶
EnsureZooPath create zookeeper path
func (ZooNode) GetChildrens ¶
GetChildrens get Zookeeper node childrens
Click to show internal directories.
Click to hide internal directories.