Compare commits
No commits in common. "e79b883faacb15c928d6655ba2ff5c9eba0fabbe" and "e4a26e7c96d3a2f66a0e985cc8ce74a144a01a20" have entirely different histories.
e79b883faa
...
e4a26e7c96
|
|
@ -39,6 +39,17 @@ import (
|
||||||
"willnorris.com/go/microformats"
|
"willnorris.com/go/microformats"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type cacheItem struct {
|
||||||
|
item []byte
|
||||||
|
created time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
var cache map[string]cacheItem
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
cache = make(map[string]cacheItem)
|
||||||
|
}
|
||||||
|
|
||||||
func (b *memoryBackend) feedHeader(fetchURL, contentType string, body io.Reader) (microsub.Feed, error) {
|
func (b *memoryBackend) feedHeader(fetchURL, contentType string, body io.Reader) (microsub.Feed, error) {
|
||||||
log.Printf("ProcessContent %s\n", fetchURL)
|
log.Printf("ProcessContent %s\n", fetchURL)
|
||||||
log.Println("Found " + contentType)
|
log.Println("Found " + contentType)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cloud.google.com/go/profiler"
|
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/pstuifzand/ekster/pkg/microsub"
|
"github.com/pstuifzand/ekster/pkg/microsub"
|
||||||
)
|
)
|
||||||
|
|
@ -59,17 +58,6 @@ func newPool(addr string) *redis.Pool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
if os.Getenv("GOOGLE_APPLICATION_CREDENTIALS") != "" {
|
|
||||||
if err := profiler.Start(profiler.Config{
|
|
||||||
Service: "microsub-server",
|
|
||||||
ServiceVersion: "1.0",
|
|
||||||
ProjectID: "microsub-server", // optional on GCP
|
|
||||||
}); err != nil {
|
|
||||||
log.Fatalf("Cannot start the profiler: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Println("eksterd - microsub server")
|
log.Println("eksterd - microsub server")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user