strategies

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2018 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	// Increment increases the internal counter and returns true if the counter
	// has hit its capacity
	Increment() bool
	// ResetCount resets the Load call counter back to 0
	ResetCount()
}

Counter provides the interface to a Load call counter. A Load call counter provides helper methods to track the number of increments and identify when the increments equal the counter capacity

func NewCounter

func NewCounter(capacity int) Counter

NewCounter returns a new instance of a Load call counter

Directories

Path Synopsis
Package once contains the implementation details for the once strategy.
Package once contains the implementation details for the once strategy.
Package sozu contains implementation details for the sozu strategy.
Package sozu contains implementation details for the sozu strategy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL