mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-05 12:41:55 -07:00
backend: add a Ping method to backend
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user