Compare commits
2 Commits
e4a26e7c96
...
e79b883faa
Author | SHA1 | Date | |
---|---|---|---|
e79b883faa | |||
0d3e2638c1 |
|
@ -39,17 +39,6 @@ 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,6 +26,7 @@ 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"
|
||||||
)
|
)
|
||||||
|
@ -58,6 +59,17 @@ 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