Skip to content

Commit

Permalink
Merge pull request #229 from kat-co/deprecate-timer
Browse files Browse the repository at this point in the history
Added TODOs to deprecate types in timer.go

This helps address bug: https://bugs.launchpad.net/juju-core/+bug/1611427

(Review request: http://reviews.vapour.ws/r/5401/)
  • Loading branch information
jujubot authored Aug 9, 2016
2 parents 8a9dea0 + ab7f000 commit 08a97af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
// after a internally stored duration. The steps as well as min and max
// durations are declared upon initialization and depend on
// the particular implementation.
//
// TODO(katco): 2016-08-09: This type is deprecated: lp:1611427
type Countdown interface {
// Reset stops the timer and resets its duration to the minimum one.
// Start must be called to start the timer again.
Expand All @@ -30,6 +32,8 @@ type Countdown interface {
// A backoff timer starts at min and gets multiplied by factor
// until it reaches max. Jitter determines whether a small
// randomization is added to the duration.
//
// TODO(katco): 2016-08-09: This type is deprecated: lp:1611427
func NewBackoffTimer(config BackoffTimerConfig) *BackoffTimer {
return &BackoffTimer{
config: config,
Expand All @@ -41,6 +45,8 @@ func NewBackoffTimer(config BackoffTimerConfig) *BackoffTimer {
// A backoff timer starts at min and gets multiplied by factor
// until it reaches max. Jitter determines whether a small
// randomization is added to the duration.
//
// TODO(katco): 2016-08-09: This type is deprecated: lp:1611427
type BackoffTimer struct {
config BackoffTimerConfig

Expand All @@ -50,6 +56,8 @@ type BackoffTimer struct {

// BackoffTimerConfig is a helper struct for backoff timer
// that encapsulates config information.
//
// TODO(katco): 2016-08-09: This type is deprecated: lp:1611427
type BackoffTimerConfig struct {
// The minimum duration after which Func is called.
Min time.Duration
Expand Down

0 comments on commit 08a97af

Please sign in to comment.