Move AnnounceResponse and ScrapeResponse to models

This commit is contained in:
Justin Li
2014-07-17 01:10:50 -04:00
parent 3ad3f11b2c
commit 9dde295b7c
6 changed files with 33 additions and 42 deletions
+7
View File
@@ -9,6 +9,7 @@ package tracker
import (
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya/drivers/backend"
"github.com/chihaya/chihaya/tracker/models"
)
type Tracker struct {
@@ -41,3 +42,9 @@ func New(cfg *config.Config) (*Tracker, error) {
backend: bc,
}, nil
}
type Writer interface {
WriteError(error) error
WriteAnnounce(*models.AnnounceResponse) error
WriteScrape(*models.ScrapeResponse) error
}