/usr/share/doc/libghc-ekg-json-doc/html/System-Metrics-Json.html is in libghc-ekg-json-doc 0.1.0.6-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>System.Metrics.Json</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-Metrics-Json.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-Metrics-Json.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ekg-json-0.1.0.6: JSON encoding of ekg metrics</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">System.Metrics.Json</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Converting metrics to JSON values</a><ul><li><a href="#g:2">Newtype wrappers with instances</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Encoding of ekg metrics as JSON. The encoding defined by the
functions in this module are standardized and used by the ekg web
UI. The purpose of this module is to let other web servers and
frameworks than the one used by the ekg package expose ekg metrics.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:sampleToJson">sampleToJson</a> :: <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Sample">Sample</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li class="src short"><a href="#v:valueToJson">valueToJson</a> :: <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Sample">Sample</a> = <a href="#v:Sample">Sample</a> <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Sample">Sample</a></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Value">Value</a> = <a href="#v:Value">Value</a> <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Value">Value</a></li></ul></div><div id="interface"><h1 id="g:1">Converting metrics to JSON values</h1><div class="top"><p class="src"><a id="v:sampleToJson" class="def">sampleToJson</a> :: <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Sample">Sample</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="src/System-Metrics-Json.html#sampleToJson" class="link">Source</a> <a href="#v:sampleToJson" class="selflink">#</a></p><div class="doc"><p>Encode metrics as nested JSON objects. Each "." in the metric
name introduces a new level of nesting. For example, the metrics
<code>[("foo.bar", 10), ("foo.baz", "label")]</code> are encoded as</p><pre>{
"foo": {
"bar": {
"type:", "c",
"val": 10
},
"baz": {
"type": "l",
"val": "label"
}
}
}</pre></div></div><div class="top"><p class="src"><a id="v:valueToJson" class="def">valueToJson</a> :: <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="src/System-Metrics-Json.html#valueToJson" class="link">Source</a> <a href="#v:valueToJson" class="selflink">#</a></p><div class="doc"><p>Encodes a single metric as a JSON object. Example:</p><pre>{
"type": "c",
"val": 89460
}</pre></div></div><h2 id="g:2">Newtype wrappers with instances</h2><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:Sample" class="def">Sample</a> <a href="src/System-Metrics-Json.html#Sample" class="link">Source</a> <a href="#t:Sample" class="selflink">#</a></p><div class="doc"><p>Newtype wrapper that provides a <code><a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:ToJSON">ToJSON</a></code> instances for the
underlying <code><a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Sample">Sample</a></code> without creating an orphan instance.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Sample" class="def">Sample</a> <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Sample">Sample</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Sample" class="caption collapser" onclick="toggleSection('i:Sample')">Instances</p><div id="section.i:Sample" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Sample:Show:1" class="instance expander" onclick="toggleSection('i:id:Sample:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="System-Metrics-Json.html#t:Sample">Sample</a></span> <a href="src/System-Metrics-Json.html#line-130" class="link">Source</a> <a href="#t:Sample" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Sample:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="System-Metrics-Json.html#t:Sample">Sample</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="System-Metrics-Json.html#t:Sample">Sample</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="System-Metrics-Json.html#t:Sample">Sample</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Sample:ToJSON:2" class="instance expander" onclick="toggleSection('i:id:Sample:ToJSON:2')"></span> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:ToJSON">ToJSON</a> <a href="System-Metrics-Json.html#t:Sample">Sample</a></span> <a href="src/System-Metrics-Json.html#line-133" class="link">Source</a> <a href="#t:Sample" class="selflink">#</a></td><td class="doc"><p>Uses <code><a href="System-Metrics-Json.html#v:sampleToJson">sampleToJson</a></code>.</p></td></tr><tr><td colspan="2"><div id="section.i:id:Sample:ToJSON:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toJSON">toJSON</a> :: <a href="System-Metrics-Json.html#t:Sample">Sample</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="#v:toJSON" class="selflink">#</a></p><p class="src"><a href="#v:toEncoding">toEncoding</a> :: <a href="System-Metrics-Json.html#t:Sample">Sample</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Encoding-Internal.html#t:Encoding">Encoding</a> <a href="#v:toEncoding" class="selflink">#</a></p><p class="src"><a href="#v:toJSONList">toJSONList</a> :: [<a href="System-Metrics-Json.html#t:Sample">Sample</a>] -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="#v:toJSONList" class="selflink">#</a></p><p class="src"><a href="#v:toEncodingList">toEncodingList</a> :: [<a href="System-Metrics-Json.html#t:Sample">Sample</a>] -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Encoding-Internal.html#t:Encoding">Encoding</a> <a href="#v:toEncodingList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:Value" class="def">Value</a> <a href="src/System-Metrics-Json.html#Value" class="link">Source</a> <a href="#t:Value" class="selflink">#</a></p><div class="doc"><p>Newtype wrapper that provides a <code><a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:ToJSON">ToJSON</a></code> instances for the
underlying <code><a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Value">Value</a></code> without creating an orphan instance.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Value" class="def">Value</a> <a href="file:///usr/share/doc/libghc-ekg-core-doc/html/System-Metrics.html#t:Value">Value</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Value" class="caption collapser" onclick="toggleSection('i:Value')">Instances</p><div id="section.i:Value" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Value:Show:1" class="instance expander" onclick="toggleSection('i:id:Value:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="System-Metrics-Json.html#t:Value">Value</a></span> <a href="src/System-Metrics-Json.html#line-139" class="link">Source</a> <a href="#t:Value" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Value:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="System-Metrics-Json.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="System-Metrics-Json.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="System-Metrics-Json.html#t:Value">Value</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Value:ToJSON:2" class="instance expander" onclick="toggleSection('i:id:Value:ToJSON:2')"></span> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:ToJSON">ToJSON</a> <a href="System-Metrics-Json.html#t:Value">Value</a></span> <a href="src/System-Metrics-Json.html#line-142" class="link">Source</a> <a href="#t:Value" class="selflink">#</a></td><td class="doc"><p>Uses <code><a href="System-Metrics-Json.html#v:valueToJson">valueToJson</a></code>.</p></td></tr><tr><td colspan="2"><div id="section.i:id:Value:ToJSON:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toJSON">toJSON</a> :: <a href="System-Metrics-Json.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="#v:toJSON" class="selflink">#</a></p><p class="src"><a href="#v:toEncoding">toEncoding</a> :: <a href="System-Metrics-Json.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Encoding-Internal.html#t:Encoding">Encoding</a> <a href="#v:toEncoding" class="selflink">#</a></p><p class="src"><a href="#v:toJSONList">toJSONList</a> :: [<a href="System-Metrics-Json.html#t:Value">Value</a>] -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="#v:toJSONList" class="selflink">#</a></p><p class="src"><a href="#v:toEncodingList">toEncodingList</a> :: [<a href="System-Metrics-Json.html#t:Value">Value</a>] -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Encoding-Internal.html#t:Encoding">Encoding</a> <a href="#v:toEncodingList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|