Documentation ¶
Index ¶
- func DBRest(httpMethod string, w http.ResponseWriter, req *http.Request)
- func DBRestHandler(w http.ResponseWriter, req *http.Request)
- func DBRestResponse(w http.ResponseWriter, req *http.Request, responseBytes []byte, axnStatus bool)
- func DBTasks(packetArray []string) ([]byte, bool)
- func DBTasksOnPacket(packet Packet) ([]byte, bool)
- func DelKey(key string) bool
- func DelKeyNS(key string) bool
- func DelKeyTSDS(key string) bool
- func DeleteFromPacket(packet Packet) bool
- func DoYouWannaContinue()
- func GetDeleteKey(w http.ResponseWriter, req *http.Request)
- func GetPushKey(w http.ResponseWriter, req *http.Request)
- func GetReadKey(w http.ResponseWriter, req *http.Request)
- func GoShare()
- func GoShareEngine(config Config)
- func GoShareHTTP(httpuri string, httpport int)
- func GoShareZMQ(ip string, replyPorts []int)
- func PrefixKeyParentNamespace(packet *Packet)
- func PrefixKeyValParentNamespace(packet *Packet)
- func PushFromPacket(packet Packet) bool
- func PushKeyVal(key string, val string) bool
- func PushKeyValNS(key string, val string) bool
- func PushKeyValNowTSDS(key string, val string) bool
- func PushKeyValTSDS(packet Packet) bool
- func ReadFromPacket(packet Packet) string
- func ReadKey(key string) golhashmap.HashMap
- func ReadKeyNS(key string) golhashmap.HashMap
- func ReadKeyTSDS(key string) golhashmap.HashMap
- type Config
- type FunkAxnParamKey
- type FunkAxnParamKeyReturnMap
- type FunkAxnParamKeyVal
- type Packet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBRest ¶
func DBRest(httpMethod string, w http.ResponseWriter, req *http.Request)
DBRest enables HTTP to formulate DBTasks call from HTTP Request.
func DBRestHandler ¶
func DBRestHandler(w http.ResponseWriter, req *http.Request)
DBRestHandler handles DB Call for HTTP Request Method at '/db'.
func DBRestResponse ¶
DBRestResponse sends proper response back to client based on success, data or error.
func DBTasks ¶
DBTasks can be provided standard Packet Data Array from any communication Protocol. Communications handled on byte streams can use it by passing standard-ized packet-array It prepares Packet and passes on to TasksOnPacket. 0MQ directly utilizes it.
func DBTasksOnPacket ¶
DBTasksOnPacket can utilize fromulated Packet. Communication can directly create packet and pass it here. HTTP directly utilizes it directly. 0MQ indirectly.
func DelKeyTSDS ¶
DelKeyTSDS deletes all keys under given namespace, same as NS. As here TimeSeries is a NameSpace
func DeleteFromPacket ¶
DeleteFromPacket can handle multi-keys delete action, it acts on packet data.
func DoYouWannaContinue ¶
func DoYouWannaContinue()
DoYouWannaContinue checking if you still wanna keep the goshare up.
func GetDeleteKey ¶
func GetDeleteKey(w http.ResponseWriter, req *http.Request)
GetDeleteKey HTTP GET DB-POST call handler at 'del'.
func GetPushKey ¶
func GetPushKey(w http.ResponseWriter, req *http.Request)
GetPushKey HTTP GET DB-POST call handler at '/put'.
func GetReadKey ¶
func GetReadKey(w http.ResponseWriter, req *http.Request)
GetReadKey HTTP GET DB-GET call handler at '/get'.
func GoShareEngine ¶
func GoShareEngine(config Config)
GoShareEngine putting together base engine for GoShare as per config. dbpath, server_uri, httpport, rep_port, *string
func GoShareHTTP ¶
GoShareHTTP handles all valid HTTP Requests for DBTasks, documentation and playground(WIP).
func GoShareZMQ ¶
GoShareZMQ starts a Daemon communicating of provided array ports over ZMQ Reply.
func PrefixKeyParentNamespace ¶
func PrefixKeyParentNamespace(packet *Packet)
PrefixKeyParentNamespace prefixes Parent Namespaces to all keys in List if val for 'parentNamespace'.
func PrefixKeyValParentNamespace ¶
func PrefixKeyValParentNamespace(packet *Packet)
PrefixKeyValParentNamespace prefixes Parent Namespaces to all key-val in HashMap if it has val for 'parentNamespace'.
func PushFromPacket ¶
PushFromPacket handles push task based on provided Packet.
func PushKeyVal ¶
PushKeyVal pushes a given set of Key-Val.
func PushKeyValNS ¶
PushKeyValNS pushes a given Namespace-Key and its value.
func PushKeyValNowTSDS ¶
PushKeyValNowTSDS pushes a key namespace-d with current time.
func PushKeyValTSDS ¶
PushKeyValTSDS pushes a key namespace-d with goltime.Timestamp.
func ReadFromPacket ¶
ReadFromPacket calls ReadFuncByKeyType for multi-keys based on provided packet.
func ReadKeyNS ¶
func ReadKeyNS(key string) golhashmap.HashMap
ReadKeyNS gets value for all descendents of given key's namespace.
func ReadKeyTSDS ¶
func ReadKeyTSDS(key string) golhashmap.HashMap
ReadKeyTSDS gets value for the asked time-frame key, aah same NS.
Types ¶
type Config ¶
Config is a hashmap used here to carry around param=paramValue for GoShare.
func ConfigFromFlags ¶
func ConfigFromFlags() Config
ConfigFromFlags configs from values provided to flags.
type FunkAxnParamKey ¶
FunkAxnParamKey is a function type which get passed one string parameter and returns one boolean. Like Del Key tasks.
func DeleteFuncByKeyType ¶
func DeleteFuncByKeyType(keyType string) FunkAxnParamKey
DeleteFuncByKeyType calls a delete action for a key based on task-type.
type FunkAxnParamKeyReturnMap ¶
type FunkAxnParamKeyReturnMap func(key string) golhashmap.HashMap
FunkAxnParamKeyReturnMap is a function type which get passed one string parameters and returns one hashmap. Like Get Key tasks.
func ReadFuncByKeyType ¶
func ReadFuncByKeyType(keyType string) FunkAxnParamKeyReturnMap
ReadFuncByKeyType calls a read task on task-type.
type FunkAxnParamKeyVal ¶
FunkAxnParamKeyVal is a function type which get passed two string parameters and returns one boolean. Like Push Key-Val calls.
func PushFuncByKeyType ¶
func PushFuncByKeyType(keyType string) FunkAxnParamKeyVal
PushFuncByKeyType returns func handle according to KeyType.
type Packet ¶
type Packet struct { DBAction string TaskType string KeyType string // key: default, namespace key: ns, timeseries key: tsds, timeseries for goshare time: now ValType string // single: default, csv, json HashMap golhashmap.HashMap KeyList []string ParentNS string // allowed for ns|tsds|now TimeDot goltime.Timestamp }
Packet for modelling data passed to GoShare into a structure of possible fields.
func CreatePacket ¶
CreatePacket formulates Packet structure from passed message array.