Documentation
¶
Index ¶
- Constants
- func GetRange(from int64, to int64) redis.ZRangeBy
- type Counter
- type HitsMeasure
- type Manager
- func (s *Manager) Close()
- func (s *Manager) Counter(i model.CounterID) *Counter
- func (s *Manager) DeleteCookie(username string, cookie *http.Cookie) error
- func (s *Manager) GetHitsForPeriod(from int64, to int64) (*HitsMeasure, error)
- func (s *Manager) GetLogs(from time.Time, to time.Time) (map[model.Result](*model.PackOfEvents), error)
- func (s *Manager) GetStats(all_ranges map[string]int64) (*PackOfMeasures, error)
- func (s *Manager) HasCookie(username string, cookie *http.Cookie) (bool, error)
- func (s *Manager) RegCounter(i model.CounterID)
- func (s *Manager) StoreCookie(username string, cookie *http.Cookie) error
- func (s *Manager) StoreEvent(e *model.RequestEvent) error
- type PackOfMeasures
Constants ¶
View Source
const COUNTER_TPL = "bouncer-counter-%s"
View Source
const NOTIFICATIONS_REDIS_CHAN = "bouncer-notifications"
View Source
const SET_REQUESTS_TPL = "bouncer-sset-%d"
View Source
const TOTAL_REQUESTS = "bouncer-nb-total-requests"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HitsMeasure ¶
type Manager ¶
func NewManager ¶
func (*Manager) DeleteCookie ¶
func (*Manager) GetHitsForPeriod ¶
func (s *Manager) GetHitsForPeriod(from int64, to int64) (*HitsMeasure, error)
func (*Manager) GetStats ¶
func (s *Manager) GetStats(all_ranges map[string]int64) (*PackOfMeasures, error)
func (*Manager) RegCounter ¶
func (*Manager) StoreCookie ¶
func (*Manager) StoreEvent ¶
func (s *Manager) StoreEvent(e *model.RequestEvent) error
type PackOfMeasures ¶
type PackOfMeasures struct {
A []interface{}
}
func NewPack ¶
func NewPack() *PackOfMeasures
func (*PackOfMeasures) Append ¶
func (m *PackOfMeasures) Append(x interface{})
func (*PackOfMeasures) ExportJSON ¶
func (m *PackOfMeasures) ExportJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.