180 lines
5.0 KiB
HTML
180 lines
5.0 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="generator" content="ExDoc v0.18.3">
|
||
<title>POABackend.Protocol – poa_backend v0.1.0</title>
|
||
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
|
||
|
||
<script src="dist/sidebar_items-ffeb4f1e51.js"></script>
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body data-type="modules">
|
||
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
|
||
|
||
<div class="main">
|
||
<button class="sidebar-button sidebar-toggle">
|
||
<span class="icon-menu" aria-hidden="true"></span>
|
||
<span class="sr-only">Toggle Sidebar</span>
|
||
</button>
|
||
<button class="sidebar-button night-mode-toggle">
|
||
<span class="icon-theme" aria-hidden="true"></span>
|
||
<span class="sr-only">Toggle Theme</span>
|
||
</button>
|
||
<section class="sidebar">
|
||
|
||
|
||
<a href="api-reference.html" class="sidebar-projectLink">
|
||
<div class="sidebar-projectDetails">
|
||
<h1 class="sidebar-projectName">
|
||
poa_backend
|
||
</h1>
|
||
<h2 class="sidebar-projectVersion">
|
||
v0.1.0
|
||
</h2>
|
||
</div>
|
||
|
||
</a>
|
||
|
||
<form class="sidebar-search" action="search.html">
|
||
<button type="submit" class="search-button">
|
||
<span class="icon-search" aria-hidden="true"></span>
|
||
</button>
|
||
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
|
||
</form>
|
||
|
||
<ul class="sidebar-listNav">
|
||
<li><a id="extras-list" href="#full-list">Pages</a></li>
|
||
|
||
|
||
<li><a id="modules-list" href="#full-list">Modules</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
<div class="gradient"></div>
|
||
<ul id="full-list" class="sidebar-fullList"></ul>
|
||
</section>
|
||
|
||
<section class="content">
|
||
<div class="content-outer">
|
||
<div id="content" class="content-inner">
|
||
|
||
|
||
<h1>
|
||
<small class="visible-xs">poa_backend v0.1.0</small>
|
||
POABackend.Protocol
|
||
|
||
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/protocol.ex#L1" title="View Source" class="view-source" rel="help">
|
||
<span class="icon-code" aria-hidden="true"></span>
|
||
<span class="sr-only">View Source</span>
|
||
</a>
|
||
|
||
</h1>
|
||
|
||
|
||
<section id="moduledoc">
|
||
<h2 id="module-poa-protocol" class="section-heading">
|
||
<a href="#module-poa-protocol" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
|
||
POA Protocol
|
||
</h2>
|
||
|
||
<p>This protocol defines the communication between the Agents and the POA Backend.</p>
|
||
<p><img src="./backend_architecture.png" alt="POA Backend Architecture"/></p>
|
||
<h3 id="module-basic-calls" class="section-heading">
|
||
<a href="#module-basic-calls" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
|
||
Basic calls
|
||
</h3>
|
||
|
||
<p>Only those calls are allowed:</p>
|
||
<ul>
|
||
<li>session (<em>not implemented</em>) - In future in order to add authentication / authorization
|
||
</li>
|
||
<li>ping - Ping message
|
||
</li>
|
||
<li>data - Specific message for a given receiver. It can be a metric itself or something else
|
||
</li>
|
||
<li>bye - Message sent when the Agent wants to close the communication explicitly
|
||
</li>
|
||
</ul>
|
||
<h4>ping call</h4>
|
||
<p>abstract request:</p>
|
||
<pre><code class="json">{
|
||
id: String() # agent id
|
||
secret: String() # secret string for authentication/authorisation
|
||
}</code></pre>
|
||
<p>response:</p>
|
||
<pre><code class="json">
|
||
{
|
||
result: String() # “success” or “error”
|
||
payload: String() # optional payload
|
||
}</code></pre>
|
||
<h4>data call</h4>
|
||
<p>abstract request:</p>
|
||
<pre><code class="json">{
|
||
id: String() # agent id
|
||
secret: String() # secret string for authentication/authorisation
|
||
type: String() # data type (for now only ethereum_metrics)
|
||
data: Object() # metric data itself
|
||
}</code></pre>
|
||
<p>response:</p>
|
||
<pre><code class="json">
|
||
{
|
||
result: String() # “success” or “error”
|
||
payload: String() # optional payload
|
||
}</code></pre>
|
||
<h4>bye call</h4>
|
||
<p>abstract request:</p>
|
||
<pre><code class="json">{
|
||
id: String() # agent id
|
||
secret: String() # secret string for authentication/authorisation
|
||
}</code></pre>
|
||
<p>response:</p>
|
||
<pre><code class="json">
|
||
{
|
||
result: String() # “success” or “error”
|
||
payload: String() # optional payload
|
||
}</code></pre>
|
||
|
||
</section>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="footer">
|
||
<p>
|
||
<span class="line">
|
||
Built using
|
||
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.18.3),
|
||
</span>
|
||
<span class="line">
|
||
designed by
|
||
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
|
||
</span>
|
||
</p>
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script src="dist/app-9bd040e5e5.js"></script>
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html>
|
||
|