Documentation
¶
Index ¶
- func GenUniqueID() string
- func ParseMultipartForm(r *http.Request) ([][2]string, error)
- func WithRecover(logger *logrus.Logger, funcs ...func())
- func ZKCreateEphemeralPath(c *zk_wrapper.Conn, zkPath string, data []byte) error
- func ZKCreatePersistentPath(c *zk_wrapper.Conn, zkPath string, data []byte) error
- func ZKCreateRecursive(c *zk_wrapper.Conn, zkPath string, flags int32, data []byte) error
- func ZKSetPersistentPath(c *zk_wrapper.Conn, zkPath string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenUniqueID ¶
func GenUniqueID() string
Generate Unique ID Currently using ULID, this maybe conflict with other process with very low possibility
func ParseMultipartForm ¶
Parse the multipart/form-data in request. Unlike the canonical http.Request.ParseMultipartForm which returns a `map[string][]string` form values, we would like to parse the form data into a [][2]string, so to keep the order of the key/value pairs in the body. as we would use this parser to get a list of messages.
NOTE: this only implements partial of the multipart/form-data protocol. we don't parse the filename parts of file uploading through form.
func WithRecover ¶
func ZKCreateEphemeralPath ¶
func ZKCreateEphemeralPath(c *zk_wrapper.Conn, zkPath string, data []byte) error
func ZKCreatePersistentPath ¶
func ZKCreatePersistentPath(c *zk_wrapper.Conn, zkPath string, data []byte) error
func ZKCreateRecursive ¶
ZKCreateRecursive creates the zkPath recursively if it does not exist.
func ZKSetPersistentPath ¶
func ZKSetPersistentPath(c *zk_wrapper.Conn, zkPath string, data []byte) error
ZKSetPersistentPath writes data to the node specified by zkPath. zkPath will be created recursively if it does not exist in zookeeper.
Types ¶
This section is empty.