general: add missing documentation

Fixes #46
This commit is contained in:
Leo Balduf
2016-09-05 14:06:42 -04:00
parent f6e362e506
commit 146fbedb86
2 changed files with 101 additions and 0 deletions
+3
View File
@@ -12,12 +12,15 @@ import (
"github.com/chihaya/chihaya/storage"
)
// Config holds the configuration common across all middleware.
type Config struct {
AnnounceInterval time.Duration `yaml:"announce_interval"`
}
var _ frontend.TrackerLogic = &Logic{}
// NewLogic creates a new instance of a TrackerLogic that executes the provided
// middleware hooks.
func NewLogic(cfg Config, peerStore storage.PeerStore, preHooks, postHooks []Hook) *Logic {
l := &Logic{
announceInterval: cfg.AnnounceInterval,