Function
installAPI
(s *GenericServer, c *Config)
Source from the content-addressed store, hash-verified
| 153 | } |
| 154 | |
| 155 | func installAPI(s *GenericServer, c *Config) { |
| 156 | if c.EnableProfiling { |
| 157 | routes.Profiling{}.Install(s.Handler.NonGoRestfulMux) |
| 158 | if c.EnableContentionProfiling { |
| 159 | runtime.SetBlockProfileRate(1) |
| 160 | } |
| 161 | } |
| 162 | if c.EnableMetrics { |
| 163 | routes.DefaultMetrics{}.Install(s.Handler.NonGoRestfulMux) |
| 164 | } |
| 165 | routes.Version{Version: c.Version}.Install(s.Handler.GoRestfulContainer) |
| 166 | } |
Tested by
no test coverage detected