Add http endpoints
This commit is contained in:
parent
3b05f4316c
commit
56116aea2a
7 changed files with 136 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
|
@ -62,6 +63,7 @@ func (mem *MemObjectStore) AwaitObjects(ids []ObjectID, c chan ObjectResult, tim
|
|||
v, ok := mem.db[id]
|
||||
if !ok {
|
||||
waitingFor[id] = true
|
||||
fmt.Println("want", id)
|
||||
} else {
|
||||
found++
|
||||
c <- ObjectResult{&Object{ID: id, Data: v}, nil}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue