Add some basic prints
This commit is contained in:
parent
d27123dd24
commit
61977e06f9
|
@ -1 +1,2 @@
|
|||
.idea
|
||||
wp-metacache
|
||||
|
|
4
main.go
4
main.go
|
@ -72,6 +72,7 @@ func (c *MetadataCache) Delete(o int64) {
|
|||
}
|
||||
|
||||
func (c *MetadataCache) Get(o int64, k string) ([]string, error) {
|
||||
log.Printf("Get %d, %s", o, k)
|
||||
// Check cache for entry
|
||||
c.lock.RLock()
|
||||
defer c.lock.Unlock()
|
||||
|
@ -107,6 +108,7 @@ func (c *MetadataCache) Get(o int64, k string) ([]string, error) {
|
|||
}
|
||||
|
||||
func loadDbEntries(ot string, id int64) map[string]metadataValues {
|
||||
log.Println("loadDbEntries")
|
||||
var entries map[string]metadataValues
|
||||
entries=make (map[string]metadataValues)
|
||||
var table string
|
||||
|
@ -188,11 +190,13 @@ type cachecommand struct {
|
|||
}
|
||||
|
||||
func handleConnection(conn net.Conn, UC MetadataCache, PC MetadataCache) {
|
||||
log.Println("handleConnection started")
|
||||
var buf []byte
|
||||
var m *MetadataCache
|
||||
_, err := conn.Read(buf)
|
||||
var c cachecommand
|
||||
err = json.Unmarshal(buf, &c)
|
||||
log.Printf("JSON got: %#v", c)
|
||||
var values []string
|
||||
if c.ObjectType == "u" {
|
||||
m = &UC
|
||||
|
|
BIN
wp-metacache
BIN
wp-metacache
Binary file not shown.
Loading…
Reference in New Issue