-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/config/memcache
endpoint
#54
Conversation
@@ -101,6 +101,8 @@ Notes: | |||
|
|||
- `/help`: show all supported request paths | |||
|
|||
- `/config/memcache`: show the [memcache](memcache.md) configuration used, so freno clients can use it to implement more efficient read strategies. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
"MemcacheServers": [], | ||
"MemcachePath": "freno", | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
|
||
w.Header().Set("Content-Type", "application/json") | ||
json.NewEncoder(w).Encode(memcacheConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
go/config/config.go
Outdated
@@ -119,5 +119,8 @@ func (settings *ConfigurationSettings) postReadAdjustments() error { | |||
if err := settings.Stores.postReadAdjustments(); err != nil { | |||
return err | |||
} | |||
if settings.MemcachePath == "" { | |||
settings.MemcachePath = "freno" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Freno clients can use Freno's memcache configuration at runtime to implement smarter strategies to access replication delay. This PR extends freno's HTTP API to provide the
GET /config/memcache
service, which returns the json representation of the memcache configuration in use:If freno is not configured to publish metrics to memcache, the following defaults will be returned: