strategies

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 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