Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Adds cache TTL and routing/caching strategy (per plugin) #639

Merged
merged 1 commit into from
Dec 18, 2015

Conversation

jcooklin
Copy link
Collaborator

  • Moves caching to the plugin pool (from plugin client)
  • Moves routing strategy to the plugin pool (from availableplugins)

Resolves #601
Partially addresses #539

@jcooklin jcooklin force-pushed the per-plugin-cache-ttl branch 3 times, most recently from 5c8f3f5 to ac036bf Compare December 18, 2015 03:11
@jcooklin
Copy link
Collaborator Author

@geauxvirtual, @danielscottt, @tiffanyfj: This should be ready to go now.

return nil, serror.New(errors.New("unable to cast client to PluginCollectorClient"))
}

// get a metrics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/a metrics/mertrics

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"mertrics"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops.

@jcooklin jcooklin force-pushed the per-plugin-cache-ttl branch from ac036bf to 1625f29 Compare December 18, 2015 17:03

type SelectablePlugin interface {
HitCount() int
LastHit() time.Time
String() string
}

type RoutingAndCaching interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think there will be other strategy types?

I guess what I'm getting at is why not strategy.Strategy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I had strategy.Strategy and felt it was better for readability to describe what kind of strategy was being provided.

I guess what I'm getting at is why not strategy.Strategy?

I lean towards being more descriptive. Refactoring the name in the future can happen when and if there is a need for another strategy type.

* Moves caching to the plugin pool (from plugin client)
* Moves routing strategy to the plugin pool (from availableplugins)

Resolves intelsdi-x#601
Partially addresses intelsdi-x#539
@jcooklin jcooklin force-pushed the per-plugin-cache-ttl branch from 1625f29 to a8ed3ae Compare December 18, 2015 17:47
@pittma
Copy link
Contributor

pittma commented Dec 18, 2015

LGTM

jcooklin added a commit that referenced this pull request Dec 18, 2015
Adds cache TTL and routing/caching strategy (per plugin)
@jcooklin jcooklin merged commit 2f1e2e1 into intelsdi-x:master Dec 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants