tracker/server/server_test.go

19 lines
545 B
Go
Raw Normal View History

2013-11-05 06:31:20 +01:00
// Copyright 2013 The Chihaya Authors. All rights reserved.
// Use of this source code is governed by the BSD 2-Clause license,
// which can be found in the LICENSE file.
package server
import (
2014-06-24 04:47:43 +02:00
"github.com/chihaya/chihaya/drivers/backend"
"github.com/chihaya/chihaya/drivers/tracker"
2013-11-05 06:31:20 +01:00
)
2014-06-24 04:47:43 +02:00
// Primer represents a function that can prime drivers with data.
type Primer func(tracker.Pool, backend.Conn) error
2013-11-05 06:31:20 +01:00
2014-06-24 04:47:43 +02:00
// Prime executes a priming function on the server.
func (s *Server) Prime(p Primer) error {
return p(s.trackerPool, s.backendConn)
2013-11-05 06:31:20 +01:00
}