backend: add a Ping method to backend

This commit is contained in:
Jimmy Zelinskie
2015-02-08 17:14:48 -05:00
parent e02f1dd0ea
commit a0bcc07893
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -14,6 +14,8 @@ import (
type driver struct{}
// NoOp is a backend driver for Chihaya that does nothing. This is used by
// public trackers.
type NoOp struct{}
// New returns a new Chihaya backend driver that does nothing.
@@ -26,6 +28,11 @@ func (n *NoOp) Close() error {
return nil
}
// Ping returns nil.
func (n *NoOp) Ping() error {
return nil
}
// RecordAnnounce returns nil.
func (n *NoOp) RecordAnnounce(delta *models.AnnounceDelta) error {
return nil