publish 1.0.0-alpha.4 docs
No files matched your search
@@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Classes Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
|
||||
|
||||
<a title="Classes Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Classes Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Classes</h1>
|
||||
<p>The following classes are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ComponentLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ComponentLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ComponentLifecycle"></a>
|
||||
<h3 class="section-name"><p>ComponentLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C"></a>
|
||||
<a name="//apple_ref/swift/Class/ComponentLifecycle" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C">ComponentLifecycle</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>Lifecycle</code> provides a basic mechanism to cleanly startup and shutdown the application, freeing resources in order before exiting.</p>
|
||||
|
||||
<a href="Classes/ComponentLifecycle.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ComponentLifecycle</span> <span class="p">:</span> <span class="kt"><a href="Protocols/LifecycleTask.html">LifecycleTask</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L254-L464">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,690 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ComponentLifecycle Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Class/ComponentLifecycle" class="dashAnchor"></a>
|
||||
|
||||
<a title="ComponentLifecycle Class Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
ComponentLifecycle Class Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>ComponentLifecycle</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ComponentLifecycle</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>Lifecycle</code> provides a basic mechanism to cleanly startup and shutdown the application, freeing resources in order before exiting.</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L254-L464">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5labelSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/label" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5labelSSvp">label</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">label</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5label6loggerACSS_7Logging6LoggerVSgtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(label:logger:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5label6loggerACSS_7Logging6LoggerVSgtcfc">init(label:<wbr>logger:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Creates a <code>ComponentLifecycle</code> instance.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">logger</span><span class="p">:</span> <span class="kt">Logger</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>logger</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Logger</code> to log with.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L270-L274">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5startyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5startyyys5Error_pSgcF">start(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L281-L283">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5start2on_y8Dispatch0E5QueueC_ys5Error_pSgctF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(on:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5start2on_y8Dispatch0E5QueueC_ys5Error_pSgctF">start(on:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">on</span> <span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span><span class="p">,</span> <span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>on</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>DispatchQueue</code> to run the handlers callback on</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L291-L294">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C12startAndWait2ony8Dispatch0G5QueueC_tKF"></a>
|
||||
<a name="//apple_ref/swift/Method/startAndWait(on:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C12startAndWait2ony8Dispatch0G5QueueC_tKF">startAndWait(on:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array and waits (blocking) until <code>shutdown</code> is called on another thread.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">startAndWait</span><span class="p">(</span><span class="n">on</span> <span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span> <span class="o">=</span> <span class="o">.</span><span class="nf">global</span><span class="p">())</span> <span class="k">throws</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>on</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>DispatchQueue</code> to run the handlers callback on</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L301-L312">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8shutdownyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/shutdown(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8shutdownyyys5Error_pSgcF">shutdown(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Shuts down the <code>LifecycleItem</code> array provided in <code>start</code> or <code>startAndWait</code>.
|
||||
Shutdown is performed in reverse order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">shutdown</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span> <span class="o">=</span> <span class="p">{</span> <span class="n">_</span> <span class="k">in</span> <span class="p">})</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L316-L350">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C4waityyF"></a>
|
||||
<a name="//apple_ref/swift/Method/wait()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C4waityyF">wait()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Waits (blocking) until <code>shutdown</code> is invoked on another thread.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">wait</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L353-L355">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ComponentLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ComponentLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ComponentLifecycle"></a>
|
||||
<h3 class="section-name"><p>ComponentLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8registeryyAA0A4Task_pd_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8registeryyAA0A4Task_pd_tF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>one or more <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L485-L487">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8registeryySayAA0A4Task_pGF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8registeryySayAA0A4Task_pGF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="p">])</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>array of <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L493-L502">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8register5label5start8shutdownySS_AA0A7HandlerVAItF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(label:start:shutdown:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8register5label5start8shutdownySS_AA0A7HandlerVAItF">register(label:<wbr>start:<wbr>shutdown:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">start</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">,</span> <span class="nv">shutdown</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>start</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the startup.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>shutdown</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L510-L512">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C16registerShutdown5label_ySS_AA0A7HandlerVtF"></a>
|
||||
<a name="//apple_ref/swift/Method/registerShutdown(label:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C16registerShutdown5label_ySS_AA0A7HandlerVtF">registerShutdown(label:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">registerShutdown</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">handler</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>handler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L519-L521">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Protocols Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
|
||||
|
||||
<a title="Protocols Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Protocols Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Protocols</h1>
|
||||
<p>The following protocols are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/LifecycleTask"></a>
|
||||
<a name="//apple_ref/swift/Section/LifecycleTask" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/LifecycleTask"></a>
|
||||
<h3 class="section-name"><p>LifecycleTask</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/LifecycleTask" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP">LifecycleTask</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Represents an item that can be started and shut down</p>
|
||||
|
||||
<a href="Protocols/LifecycleTask.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">LifecycleTask</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L27-L31">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,221 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>LifecycleTask Protocol Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Protocol/LifecycleTask" class="dashAnchor"></a>
|
||||
|
||||
<a title="LifecycleTask Protocol Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
LifecycleTask Protocol Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>LifecycleTask</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">LifecycleTask</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Represents an item that can be started and shut down</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L27-L31">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP5labelSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/label" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP5labelSSvp">label</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">label</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP5startyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP5startyyys5Error_pSgcF">start(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP8shutdownyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/shutdown(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP8shutdownyyys5Error_pSgcF">shutdown(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">shutdown</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,205 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Structures Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
|
||||
|
||||
<a title="Structures Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Structures Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Structures</h1>
|
||||
<p>The following structures are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/LifecycleHandler"></a>
|
||||
<a name="//apple_ref/swift/Section/LifecycleHandler" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/LifecycleHandler"></a>
|
||||
<h3 class="section-name"><p>LifecycleHandler</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV"></a>
|
||||
<a name="//apple_ref/swift/Struct/LifecycleHandler" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV">LifecycleHandler</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Supported startup and shutdown method styles</p>
|
||||
|
||||
<a href="Structs/LifecycleHandler.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L36-L80">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ServiceLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ServiceLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ServiceLifecycle"></a>
|
||||
<h3 class="section-name"><p>ServiceLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V"></a>
|
||||
<a name="//apple_ref/swift/Struct/ServiceLifecycle" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V">ServiceLifecycle</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="Structs/ServiceLifecycle.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ServiceLifecycle</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L84-L143">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,308 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>LifecycleHandler Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/LifecycleHandler" class="dashAnchor"></a>
|
||||
|
||||
<a title="LifecycleHandler Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
LifecycleHandler Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>LifecycleHandler</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Supported startup and shutdown method styles</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L36-L80">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerVyACyys5Error_pSgcccfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerVyACyys5Error_pSgcccfc">init(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Initialize a <code>Lifecycle.Handler</code> based on a completion handler.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>the underlying completion handler</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L43-L45">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV5asyncyACyys5Error_pSgccFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/async(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV5asyncyACyys5Error_pSgccFZ">async(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Asynchronous <code>Lifecycle.Handler</code> based on a completion handler.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">async</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>the underlying completion handler</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L51-L53">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV4syncyACyyKcFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/sync(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV4syncyACyyKcFZ">sync(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Asynchronous <code>Lifecycle.Handler</code> based on a blocking, throwing function.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">sync</span><span class="p">(</span><span class="n">_</span> <span class="nv">body</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">()</span> <span class="k">throws</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>body</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>the underlying function</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L59-L68">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV4noneACvpZ"></a>
|
||||
<a name="//apple_ref/swift/Variable/none" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV4noneACvpZ">none</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Noop <code>Lifecycle.Handler</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">none</span><span class="p">:</span> <span class="kt">LifecycleHandler</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L71-L75">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,732 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ServiceLifecycle Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/ServiceLifecycle" class="dashAnchor"></a>
|
||||
|
||||
<a title="ServiceLifecycle Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
ServiceLifecycle Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>ServiceLifecycle</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ServiceLifecycle</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Undocumented</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L84-L143">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13configurationA2C13ConfigurationV_tcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(configuration:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13configurationA2C13ConfigurationV_tcfc">init(configuration:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Creates a <code><a href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a></code> instance.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">configuration</span><span class="p">:</span> <span class="kt"><a href="../Structs/ServiceLifecycle/Configuration.html">Configuration</a></span> <span class="o">=</span> <span class="o">.</span><span class="nf">init</span><span class="p">())</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>configuration</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Defines lifecycle <code><a href="../Structs/ServiceLifecycle/Configuration.html">Configuration</a></code></p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L92-L100">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V5startyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V5startyyys5Error_pSgcF">start(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L107-L119">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V12startAndWaityyKF"></a>
|
||||
<a name="//apple_ref/swift/Method/startAndWait()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V12startAndWaityyKF">startAndWait()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array and waits (blocking) until a shutdown <code><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></code> is captured or <code>shutdown</code> is called on another thread.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">startAndWait</span><span class="p">()</span> <span class="k">throws</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>configuration</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Defines lifecycle <code><a href="../Structs/ServiceLifecycle/Configuration.html">Configuration</a></code></p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L126-L128">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8shutdownyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/shutdown(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8shutdownyyys5Error_pSgcF">shutdown(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Shuts down the <code>LifecycleItem</code> array provided in <code>start</code> or <code>startAndWait</code>.
|
||||
Shutdown is performed in reverse order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">shutdown</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span> <span class="o">=</span> <span class="p">{</span> <span class="n">_</span> <span class="k">in</span> <span class="p">})</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L135-L137">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V4waityyF"></a>
|
||||
<a name="//apple_ref/swift/Method/wait()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V4waityyF">wait()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Waits (blocking) until shutdown <code><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></code> is captured or <code>shutdown</code> is invoked on another thread.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">wait</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L140-L142">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ServiceLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ServiceLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ServiceLifecycle"></a>
|
||||
<h3 class="section-name"><p>ServiceLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V4trap6signal7handler2on8Dispatch0G12SourceSignal_pAC0I0V_yAKcAH0G5QueueCtFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/trap(signal:handler:on:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V4trap6signal7handler2on8Dispatch0G12SourceSignal_pAC0I0V_yAKcAH0G5QueueCtFZ">trap(signal:<wbr>handler:<wbr>on:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Setup a signal trap.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">trap</span><span class="p">(</span><span class="n">signal</span> <span class="nv">sig</span><span class="p">:</span> <span class="kt"><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">,</span> <span class="nv">handler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt"><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">,</span> <span class="n">on</span> <span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span> <span class="o">=</span> <span class="o">.</span><span class="nf">global</span><span class="p">())</span> <span class="o">-></span> <span class="kt">DispatchSourceSignal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>signal</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The signal to trap.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>handler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>closure to invoke when the signal is captured.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>a <code>DispatchSourceSignal</code> for the given trap. The source must be cancled by the caller.</p>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L152-L161">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V6SignalV"></a>
|
||||
<a name="//apple_ref/swift/Struct/Signal" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V6SignalV">Signal</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A system signal</p>
|
||||
|
||||
<a href="../Structs/ServiceLifecycle/Signal.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Signal</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L164-L183">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8registeryyAA0A4Task_pd_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8registeryyAA0A4Task_pd_tF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>one or more <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L191-L193">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8registeryySayAA0A4Task_pGF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8registeryySayAA0A4Task_pGF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="p">])</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>array of <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L199-L201">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8register5label5start8shutdownySS_AA0A7HandlerVAItF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(label:start:shutdown:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8register5label5start8shutdownySS_AA0A7HandlerVAItF">register(label:<wbr>start:<wbr>shutdown:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">start</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">,</span> <span class="nv">shutdown</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>start</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the startup.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>shutdown</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L209-L211">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V16registerShutdown5label_ySS_AA0A7HandlerVtF"></a>
|
||||
<a name="//apple_ref/swift/Method/registerShutdown(label:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V16registerShutdown5label_ySS_AA0A7HandlerVtF">registerShutdown(label:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">registerShutdown</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">handler</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>handler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L218-L220">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV"></a>
|
||||
<a name="//apple_ref/swift/Struct/Configuration" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV">Configuration</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>Lifecycle</code> configuration options.</p>
|
||||
|
||||
<a href="../Structs/ServiceLifecycle/Configuration.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Configuration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L225-L244">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,284 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Configuration Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../../js/jquery.min.js" defer></script>
|
||||
<script src="../../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../../js/lunr.min.js" defer></script>
|
||||
<script src="../../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/Configuration" class="dashAnchor"></a>
|
||||
|
||||
<a title="Configuration Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../../img/carat.png" />
|
||||
Configuration Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Configuration</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Configuration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>Lifecycle</code> configuration options.</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L225-L244">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV6logger7Logging6LoggerVvp"></a>
|
||||
<a name="//apple_ref/swift/Property/logger" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger7Logging6LoggerVvp">logger</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines the <code>Logger</code> to log with.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">logger</span><span class="p">:</span> <span class="kt">Logger</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L227">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV13callbackQueue8Dispatch0fE0Cvp"></a>
|
||||
<a name="//apple_ref/swift/Property/callbackQueue" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV13callbackQueue8Dispatch0fE0Cvp">callbackQueue</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines the <code>DispatchQueue</code> on which startup and shutdown callback handlers are run.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">callbackQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L229">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV14shutdownSignalSayAC0E0VGSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/shutdownSignal" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV14shutdownSignalSayAC0E0VGSgvp">shutdownSignal</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines if to install a crash signal trap that prints backtraces.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">shutdownSignal</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a></span><span class="o">.</span><span class="kt"><a href="../../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">]?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L231">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV16installBacktraceSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/installBacktrace" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV16installBacktraceSbvp">installBacktrace</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines what, if any, signals to trap for invoking shutdown.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">installBacktrace</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L233">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV6logger13callbackQueue14shutdownSignal16installBacktraceAE7Logging6LoggerV_8Dispatch0mF0CSayAC0H0VGSgSbtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(logger:callbackQueue:shutdownSignal:installBacktrace:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger13callbackQueue14shutdownSignal16installBacktraceAE7Logging6LoggerV_8Dispatch0mF0CSayAC0H0VGSgSbtcfc">init(logger:<wbr>callbackQueue:<wbr>shutdownSignal:<wbr>installBacktrace:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">logger</span><span class="p">:</span> <span class="kt">Logger</span> <span class="o">=</span> <span class="kt">Logger</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="s">"Lifeycle"</span><span class="p">),</span>
|
||||
<span class="nv">callbackQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span> <span class="o">=</span> <span class="o">.</span><span class="nf">global</span><span class="p">(),</span>
|
||||
<span class="nv">shutdownSignal</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">]?</span> <span class="o">=</span> <span class="p">[</span><span class="o">.</span><span class="kt">TERM</span><span class="p">,</span> <span class="o">.</span><span class="kt">INT</span><span class="p">],</span>
|
||||
<span class="nv">installBacktrace</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L235-L243">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,220 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Signal Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../../js/jquery.min.js" defer></script>
|
||||
<script src="../../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../../js/lunr.min.js" defer></script>
|
||||
<script src="../../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/Signal" class="dashAnchor"></a>
|
||||
|
||||
<a title="Signal Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../../img/carat.png" />
|
||||
Signal Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Signal</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Signal</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>A system signal</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L164-L183">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V6SignalV4TERMAEvpZ"></a>
|
||||
<a name="//apple_ref/swift/Variable/TERM" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V6SignalV4TERMAEvpZ">TERM</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">TERM</span><span class="p">:</span> <span class="kt"><a href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a></span><span class="o">.</span><span class="kt">Signal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V6SignalV3INTAEvpZ"></a>
|
||||
<a name="//apple_ref/swift/Variable/INT" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V6SignalV3INTAEvpZ">INT</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">INT</span><span class="p">:</span> <span class="kt"><a href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a></span><span class="o">.</span><span class="kt">Signal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L172-L182">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="128" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h93v20H0z"/>
|
||||
<path fill="#a4a61d" d="M93 0h35v20H93z"/>
|
||||
<path fill="url(#b)" d="M0 0h128v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="830">
|
||||
documentation
|
||||
</text>
|
||||
<text x="475" y="140" transform="scale(.1)" textLength="830">
|
||||
documentation
|
||||
</text>
|
||||
<text x="1095" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">
|
||||
76%
|
||||
</text>
|
||||
<text x="1095" y="140" transform="scale(.1)" textLength="250">
|
||||
76%
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,200 @@
|
||||
/* Credit to https://gist.github.com/wataru420/2048287 */
|
||||
.highlight {
|
||||
/* Comment */
|
||||
/* Error */
|
||||
/* Keyword */
|
||||
/* Operator */
|
||||
/* Comment.Multiline */
|
||||
/* Comment.Preproc */
|
||||
/* Comment.Single */
|
||||
/* Comment.Special */
|
||||
/* Generic.Deleted */
|
||||
/* Generic.Deleted.Specific */
|
||||
/* Generic.Emph */
|
||||
/* Generic.Error */
|
||||
/* Generic.Heading */
|
||||
/* Generic.Inserted */
|
||||
/* Generic.Inserted.Specific */
|
||||
/* Generic.Output */
|
||||
/* Generic.Prompt */
|
||||
/* Generic.Strong */
|
||||
/* Generic.Subheading */
|
||||
/* Generic.Traceback */
|
||||
/* Keyword.Constant */
|
||||
/* Keyword.Declaration */
|
||||
/* Keyword.Pseudo */
|
||||
/* Keyword.Reserved */
|
||||
/* Keyword.Type */
|
||||
/* Literal.Number */
|
||||
/* Literal.String */
|
||||
/* Name.Attribute */
|
||||
/* Name.Builtin */
|
||||
/* Name.Class */
|
||||
/* Name.Constant */
|
||||
/* Name.Entity */
|
||||
/* Name.Exception */
|
||||
/* Name.Function */
|
||||
/* Name.Namespace */
|
||||
/* Name.Tag */
|
||||
/* Name.Variable */
|
||||
/* Operator.Word */
|
||||
/* Text.Whitespace */
|
||||
/* Literal.Number.Float */
|
||||
/* Literal.Number.Hex */
|
||||
/* Literal.Number.Integer */
|
||||
/* Literal.Number.Oct */
|
||||
/* Literal.String.Backtick */
|
||||
/* Literal.String.Char */
|
||||
/* Literal.String.Doc */
|
||||
/* Literal.String.Double */
|
||||
/* Literal.String.Escape */
|
||||
/* Literal.String.Heredoc */
|
||||
/* Literal.String.Interpol */
|
||||
/* Literal.String.Other */
|
||||
/* Literal.String.Regex */
|
||||
/* Literal.String.Single */
|
||||
/* Literal.String.Symbol */
|
||||
/* Name.Builtin.Pseudo */
|
||||
/* Name.Variable.Class */
|
||||
/* Name.Variable.Global */
|
||||
/* Name.Variable.Instance */
|
||||
/* Literal.Number.Integer.Long */ }
|
||||
.highlight .c {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2; }
|
||||
.highlight .k {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .o {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .cm {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cp {
|
||||
color: #999999;
|
||||
font-weight: bold; }
|
||||
.highlight .c1 {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cs {
|
||||
color: #999999;
|
||||
font-weight: bold;
|
||||
font-style: italic; }
|
||||
.highlight .gd {
|
||||
color: #000000;
|
||||
background-color: #ffdddd; }
|
||||
.highlight .gd .x {
|
||||
color: #000000;
|
||||
background-color: #ffaaaa; }
|
||||
.highlight .ge {
|
||||
color: #000000;
|
||||
font-style: italic; }
|
||||
.highlight .gr {
|
||||
color: #aa0000; }
|
||||
.highlight .gh {
|
||||
color: #999999; }
|
||||
.highlight .gi {
|
||||
color: #000000;
|
||||
background-color: #ddffdd; }
|
||||
.highlight .gi .x {
|
||||
color: #000000;
|
||||
background-color: #aaffaa; }
|
||||
.highlight .go {
|
||||
color: #888888; }
|
||||
.highlight .gp {
|
||||
color: #555555; }
|
||||
.highlight .gs {
|
||||
font-weight: bold; }
|
||||
.highlight .gu {
|
||||
color: #aaaaaa; }
|
||||
.highlight .gt {
|
||||
color: #aa0000; }
|
||||
.highlight .kc {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kd {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kp {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kr {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kt {
|
||||
color: #445588; }
|
||||
.highlight .m {
|
||||
color: #009999; }
|
||||
.highlight .s {
|
||||
color: #d14; }
|
||||
.highlight .na {
|
||||
color: #008080; }
|
||||
.highlight .nb {
|
||||
color: #0086B3; }
|
||||
.highlight .nc {
|
||||
color: #445588;
|
||||
font-weight: bold; }
|
||||
.highlight .no {
|
||||
color: #008080; }
|
||||
.highlight .ni {
|
||||
color: #800080; }
|
||||
.highlight .ne {
|
||||
color: #990000;
|
||||
font-weight: bold; }
|
||||
.highlight .nf {
|
||||
color: #990000; }
|
||||
.highlight .nn {
|
||||
color: #555555; }
|
||||
.highlight .nt {
|
||||
color: #000080; }
|
||||
.highlight .nv {
|
||||
color: #008080; }
|
||||
.highlight .ow {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .w {
|
||||
color: #bbbbbb; }
|
||||
.highlight .mf {
|
||||
color: #009999; }
|
||||
.highlight .mh {
|
||||
color: #009999; }
|
||||
.highlight .mi {
|
||||
color: #009999; }
|
||||
.highlight .mo {
|
||||
color: #009999; }
|
||||
.highlight .sb {
|
||||
color: #d14; }
|
||||
.highlight .sc {
|
||||
color: #d14; }
|
||||
.highlight .sd {
|
||||
color: #d14; }
|
||||
.highlight .s2 {
|
||||
color: #d14; }
|
||||
.highlight .se {
|
||||
color: #d14; }
|
||||
.highlight .sh {
|
||||
color: #d14; }
|
||||
.highlight .si {
|
||||
color: #d14; }
|
||||
.highlight .sx {
|
||||
color: #d14; }
|
||||
.highlight .sr {
|
||||
color: #009926; }
|
||||
.highlight .s1 {
|
||||
color: #d14; }
|
||||
.highlight .ss {
|
||||
color: #990073; }
|
||||
.highlight .bp {
|
||||
color: #999999; }
|
||||
.highlight .vc {
|
||||
color: #008080; }
|
||||
.highlight .vg {
|
||||
color: #008080; }
|
||||
.highlight .vi {
|
||||
color: #008080; }
|
||||
.highlight .il {
|
||||
color: #009999; }
|
||||
@@ -0,0 +1,395 @@
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
letter-spacing: .2px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
box-sizing: border-box; }
|
||||
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.6em; }
|
||||
|
||||
h2 {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.3em; }
|
||||
|
||||
h3 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
margin: 1em 0 0.3em; }
|
||||
|
||||
h4 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.85em; }
|
||||
|
||||
h5 {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.85em; }
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.85em;
|
||||
color: #777; }
|
||||
|
||||
p {
|
||||
margin: 0 0 1em; }
|
||||
|
||||
ul, ol {
|
||||
padding: 0 0 0 2em;
|
||||
margin: 0 0 0.85em; }
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 0.85em;
|
||||
padding: 0 15px;
|
||||
color: #858585;
|
||||
border-left: 4px solid #e5e5e5; }
|
||||
|
||||
img {
|
||||
max-width: 100%; }
|
||||
|
||||
a {
|
||||
color: #4183c4;
|
||||
text-decoration: none; }
|
||||
a:hover, a:focus {
|
||||
outline: 0;
|
||||
text-decoration: underline; }
|
||||
a.discouraged {
|
||||
text-decoration: line-through; }
|
||||
a.discouraged:hover, a.discouraged:focus {
|
||||
text-decoration: underline line-through; }
|
||||
|
||||
table {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
overflow: auto;
|
||||
margin: 0 0 0.85em; }
|
||||
|
||||
tr:nth-child(2n) {
|
||||
background-color: #fbfbfb; }
|
||||
|
||||
th, td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
pre {
|
||||
margin: 0 0 1.275em;
|
||||
padding: .85em 1em;
|
||||
overflow: auto;
|
||||
background: #f7f7f7;
|
||||
font-size: .85em;
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||
|
||||
code {
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||
|
||||
.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code {
|
||||
background: #f7f7f7;
|
||||
padding: .2em; }
|
||||
.item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after {
|
||||
letter-spacing: -.2em;
|
||||
content: "\00a0"; }
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
white-space: pre; }
|
||||
|
||||
.content-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column; }
|
||||
@media (min-width: 768px) {
|
||||
.content-wrapper {
|
||||
flex-direction: row; } }
|
||||
.header {
|
||||
display: flex;
|
||||
padding: 8px;
|
||||
font-size: 0.875em;
|
||||
background: #444;
|
||||
color: #999; }
|
||||
|
||||
.header-col {
|
||||
margin: 0;
|
||||
padding: 0 8px; }
|
||||
|
||||
.header-col--primary {
|
||||
flex: 1; }
|
||||
|
||||
.header-link {
|
||||
color: #fff; }
|
||||
|
||||
.header-icon {
|
||||
padding-right: 6px;
|
||||
vertical-align: -4px;
|
||||
height: 16px; }
|
||||
|
||||
.breadcrumbs {
|
||||
font-size: 0.875em;
|
||||
padding: 8px 16px;
|
||||
margin: 0;
|
||||
background: #fbfbfb;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
|
||||
.carat {
|
||||
height: 10px;
|
||||
margin: 0 5px; }
|
||||
|
||||
.navigation {
|
||||
order: 2; }
|
||||
@media (min-width: 768px) {
|
||||
.navigation {
|
||||
order: 1;
|
||||
width: 25%;
|
||||
max-width: 300px;
|
||||
padding-bottom: 64px;
|
||||
overflow: hidden;
|
||||
word-wrap: normal;
|
||||
background: #fbfbfb;
|
||||
border-right: 1px solid #ddd; } }
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
padding-left: 0; }
|
||||
|
||||
.nav-group-name {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 8px 0 8px 16px; }
|
||||
|
||||
.nav-group-name-link {
|
||||
color: #333; }
|
||||
|
||||
.nav-group-tasks {
|
||||
margin: 8px 0;
|
||||
padding: 0 0 0 8px; }
|
||||
|
||||
.nav-group-task {
|
||||
font-size: 1em;
|
||||
list-style-type: none;
|
||||
white-space: nowrap; }
|
||||
|
||||
.nav-group-task-link {
|
||||
color: #808080; }
|
||||
|
||||
.main-content {
|
||||
order: 1; }
|
||||
@media (min-width: 768px) {
|
||||
.main-content {
|
||||
order: 2;
|
||||
flex: 1;
|
||||
padding-bottom: 60px; } }
|
||||
.section {
|
||||
padding: 0 32px;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
|
||||
.section-content {
|
||||
max-width: 834px;
|
||||
margin: 0 auto;
|
||||
padding: 16px 0; }
|
||||
|
||||
.section-name {
|
||||
color: #666;
|
||||
display: block; }
|
||||
.section-name p {
|
||||
margin-bottom: inherit; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
padding: 8px 0;
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
border: none; }
|
||||
|
||||
.task-group-section {
|
||||
border-top: 1px solid #ddd; }
|
||||
|
||||
.task-group {
|
||||
padding-top: 0px; }
|
||||
|
||||
.task-name-container a[name]:before {
|
||||
content: "";
|
||||
display: block; }
|
||||
|
||||
.section-name-container {
|
||||
position: relative; }
|
||||
.section-name-container .section-name-link {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin-bottom: 0; }
|
||||
.section-name-container .section-name {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
z-index: 1; }
|
||||
.section-name-container .section-name a {
|
||||
pointer-events: auto; }
|
||||
|
||||
.item-container {
|
||||
padding: 0; }
|
||||
|
||||
.item {
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
list-style-type: none; }
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block; }
|
||||
.item .token, .item .direct-link {
|
||||
display: inline-block;
|
||||
text-indent: -20px;
|
||||
padding-left: 3px;
|
||||
margin-left: 20px;
|
||||
font-size: 1rem; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
color: #808080;
|
||||
font-style: italic; }
|
||||
|
||||
.pointer-container {
|
||||
border-bottom: 1px solid #ddd;
|
||||
left: -23px;
|
||||
padding-bottom: 13px;
|
||||
position: relative;
|
||||
width: 110%; }
|
||||
|
||||
.pointer {
|
||||
left: 21px;
|
||||
top: 7px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-left: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd;
|
||||
background: #fff;
|
||||
transform: rotate(45deg); }
|
||||
|
||||
.height-container {
|
||||
display: none;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden; }
|
||||
.height-container .section {
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-top-width: 0;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px;
|
||||
padding: 8px 16px; }
|
||||
|
||||
.aside, .language {
|
||||
padding: 6px 12px;
|
||||
margin: 12px 0;
|
||||
border-left: 5px solid #dddddd;
|
||||
overflow-y: hidden; }
|
||||
.aside .aside-title, .language .aside-title {
|
||||
font-size: 9px;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
padding-bottom: 0;
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
-webkit-user-select: none; }
|
||||
.aside p:last-child, .language p:last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.language {
|
||||
border-left: 5px solid #cde9f4; }
|
||||
.language .aside-title {
|
||||
color: #4183c4; }
|
||||
|
||||
.aside-warning, .aside-deprecated, .aside-unavailable {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
border-collapse: collapse;
|
||||
width: 100%; }
|
||||
.graybox p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
min-width: 50px; }
|
||||
.graybox td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 5px 25px 5px 10px;
|
||||
vertical-align: middle; }
|
||||
.graybox tr td:first-of-type {
|
||||
text-align: right;
|
||||
padding: 7px;
|
||||
vertical-align: top;
|
||||
word-break: normal;
|
||||
width: 40px; }
|
||||
|
||||
.slightly-smaller {
|
||||
font-size: 0.9em; }
|
||||
|
||||
.footer {
|
||||
padding: 8px 16px;
|
||||
background: #444;
|
||||
color: #ddd;
|
||||
font-size: 0.8em; }
|
||||
.footer p {
|
||||
margin: 8px 0; }
|
||||
.footer a {
|
||||
color: #fff; }
|
||||
|
||||
html.dash .header, html.dash .breadcrumbs, html.dash .navigation {
|
||||
display: none; }
|
||||
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
|
||||
form[role=search] input {
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
padding: 0 10px;
|
||||
margin: 0;
|
||||
border: none;
|
||||
border-radius: 1em; }
|
||||
.loading form[role=search] input {
|
||||
background: white url(../img/spinner.gif) center right 4px no-repeat; }
|
||||
|
||||
form[role=search] .tt-menu {
|
||||
margin: 0;
|
||||
min-width: 300px;
|
||||
background: #fbfbfb;
|
||||
color: #333;
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
form[role=search] .tt-highlight {
|
||||
font-weight: bold; }
|
||||
|
||||
form[role=search] .tt-suggestion {
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
padding: 0 8px; }
|
||||
form[role=search] .tt-suggestion span {
|
||||
display: table-cell;
|
||||
white-space: nowrap; }
|
||||
form[role=search] .tt-suggestion .doc-parent-name {
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
font-weight: normal;
|
||||
font-size: 0.9em;
|
||||
padding-left: 16px; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover,
|
||||
form[role=search] .tt-suggestion.tt-cursor {
|
||||
cursor: pointer;
|
||||
background-color: #4183c4;
|
||||
color: #fff; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover .doc-parent-name,
|
||||
form[role=search] .tt-suggestion.tt-cursor .doc-parent-name {
|
||||
color: #fff; }
|
||||
|
After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Lifecycle Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<a title="Lifecycle Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Lifecycle Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
|
||||
<h1 id='swiftservicelifecycle-docs' class='heading'>SwiftServiceLifecycle Docs</h1>
|
||||
|
||||
<p>SwiftServiceLifecycle provides a basic mechanism to cleanly start up and shut down the application, freeing resources in order before exiting.
|
||||
It also provides a Signal based shutdown hook, to shutdown on signals like TERM or INT.</p>
|
||||
|
||||
<p>SwiftServiceLifecycle is non-framework specific, designed to be integrated with any server framework or directly in an application.</p>
|
||||
|
||||
<p>To get started with SwiftServiceLifecycle, <a href="../Lifecycle/index.html"><code>import Lifecycle</code></a>.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
window.jazzy = {'docset': false}
|
||||
if (typeof window.dash != 'undefined') {
|
||||
document.documentElement.className += ' dash'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
if (navigator.userAgent.match(/xcode/i)) {
|
||||
document.documentElement.className += ' xcode'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
function toggleItem($link, $content) {
|
||||
var animationDuration = 300;
|
||||
$link.toggleClass('token-open');
|
||||
$content.slideToggle(animationDuration);
|
||||
}
|
||||
|
||||
function itemLinkToContent($link) {
|
||||
return $link.parent().parent().next();
|
||||
}
|
||||
|
||||
// On doc load + hash-change, open any targetted item
|
||||
function openCurrentItemIfClosed() {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token');
|
||||
$content = itemLinkToContent($link);
|
||||
if ($content.is(':hidden')) {
|
||||
toggleItem($link, $content);
|
||||
}
|
||||
}
|
||||
|
||||
$(openCurrentItemIfClosed);
|
||||
$(window).on('hashchange', openCurrentItemIfClosed);
|
||||
|
||||
// On item link ('token') click, toggle its discussion
|
||||
$('.token').on('click', function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var $link = $(this);
|
||||
toggleItem($link, itemLinkToContent($link));
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $link.attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
location.hash = href;
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
// Clicks on links to the current, closed, item need to open the item
|
||||
$("a:not('.token')").on('click', function() {
|
||||
if (location == this.href) {
|
||||
openCurrentItemIfClosed();
|
||||
}
|
||||
});
|
||||
|
||||
// KaTeX rendering
|
||||
if ("katex" in window) {
|
||||
$($('.math').each( (_, element) => {
|
||||
katex.render(element.textContent, element, {
|
||||
displayMode: $(element).hasClass('m-block'),
|
||||
throwOnError: false,
|
||||
trust: true
|
||||
});
|
||||
}))
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
$(function(){
|
||||
var $typeahead = $('[data-typeahead]');
|
||||
var $form = $typeahead.parents('form');
|
||||
var searchURL = $form.attr('action');
|
||||
|
||||
function displayTemplate(result) {
|
||||
return result.name;
|
||||
}
|
||||
|
||||
function suggestionTemplate(result) {
|
||||
var t = '<div class="list-group-item clearfix">';
|
||||
t += '<span class="doc-name">' + result.name + '</span>';
|
||||
if (result.parent_name) {
|
||||
t += '<span class="doc-parent-name label">' + result.parent_name + '</span>';
|
||||
}
|
||||
t += '</div>';
|
||||
return t;
|
||||
}
|
||||
|
||||
$typeahead.one('focus', function() {
|
||||
$form.addClass('loading');
|
||||
|
||||
$.getJSON(searchURL).then(function(searchData) {
|
||||
const searchIndex = lunr(function() {
|
||||
this.ref('url');
|
||||
this.field('name');
|
||||
this.field('abstract');
|
||||
for (const [url, doc] of Object.entries(searchData)) {
|
||||
this.add({url: url, name: doc.name, abstract: doc.abstract});
|
||||
}
|
||||
});
|
||||
|
||||
$typeahead.typeahead(
|
||||
{
|
||||
highlight: true,
|
||||
minLength: 3,
|
||||
autoselect: true
|
||||
},
|
||||
{
|
||||
limit: 10,
|
||||
display: displayTemplate,
|
||||
templates: { suggestion: suggestionTemplate },
|
||||
source: function(query, sync) {
|
||||
const lcSearch = query.toLowerCase();
|
||||
const results = searchIndex.query(function(q) {
|
||||
q.term(lcSearch, { boost: 100 });
|
||||
q.term(lcSearch, {
|
||||
boost: 10,
|
||||
wildcard: lunr.Query.wildcard.TRAILING
|
||||
});
|
||||
}).map(function(result) {
|
||||
var doc = searchData[result.ref];
|
||||
doc.url = result.ref;
|
||||
return doc;
|
||||
});
|
||||
sync(results);
|
||||
}
|
||||
}
|
||||
);
|
||||
$form.removeClass('loading');
|
||||
$typeahead.trigger('focus');
|
||||
});
|
||||
});
|
||||
|
||||
var baseURL = searchURL.slice(0, -"search.json".length);
|
||||
|
||||
$typeahead.on('typeahead:select', function(e, result) {
|
||||
window.location = baseURL + result.url;
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-lLine truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.7
|
||||
* Copyright (C) 2019 Oliver Nightingale
|
||||
* @license MIT
|
||||
*/
|
||||
!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.7",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var n=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[n]=s}}return t},e.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var r=t.indexOf(e.FieldRef.joiner);if(r===-1)throw"malformed field ref string";var i=t.slice(0,r),n=t.slice(r+1);return new e.FieldRef(n,i,t)},e.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue},e.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},e.Set.complete={intersect:function(e){return e},union:function(e){return e},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},e.Set.prototype.contains=function(e){return!!this.elements[e]},e.Set.prototype.intersect=function(t){var r,i,n,s=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(r=this,i=t):(r=t,i=this),n=Object.keys(r.elements);for(var o=0;o<n.length;o++){var a=n[o];a in i.elements&&s.push(a)}return new e.Set(s)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},e.Token=function(e,t){this.str=e||"",this.metadata=t||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(e){return e},new e.Token(t(this.str,this.metadata),this.metadata)},e.tokenizer=function(t,r){if(null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return new e.Token(e.utils.asString(t).toLowerCase(),e.utils.clone(r))});for(var i=t.toString().toLowerCase(),n=i.length,s=[],o=0,a=0;o<=n;o++){var u=i.charAt(o),l=o-a;if(u.match(e.tokenizer.separator)||o==n){if(l>0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var i=this._stack[r],n=[],s=0;s<e.length;s++){var o=i(e[s],s,e);if(null!==o&&void 0!==o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)n.push(o[a]);else n.push(o)}e=n}return e},e.Pipeline.prototype.runString=function(t,r){var i=new e.Token(t,r);return this.run([i]).map(function(e){return e.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(e){this._magnitude=0,this.elements=e||[]},e.Vector.prototype.positionForIndex=function(e){if(0==this.elements.Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger7Logging6LoggerVvp":{"name":"logger","abstract":"<p>Defines the <code>Logger</code> to log with.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV13callbackQueue8Dispatch0fE0Cvp":{"name":"callbackQueue","abstract":"<p>Defines the <code>DispatchQueue</code> on which startup and shutdown callback handlers are run.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV14shutdownSignalSayAC0E0VGSgvp":{"name":"shutdownSignal","abstract":"<p>Defines if to install a crash signal trap that prints backtraces.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV16installBacktraceSbvp":{"name":"installBacktrace","abstract":"<p>Defines what, if any, signals to trap for invoking shutdown.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger13callbackQueue14shutdownSignal16installBacktraceAE7Logging6LoggerV_8Dispatch0mF0CSayAC0H0VGSgSbtcfc":{"name":"init(logger:callbackQueue:shutdownSignal:installBacktrace:)","abstract":"<p>Undocumented</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Signal.html#/s:9Lifecycle07ServiceA0V6SignalV4TERMAEvpZ":{"name":"TERM","abstract":"<p>Undocumented</p>","parent_name":"Signal"},"Structs/ServiceLifecycle/Signal.html#/s:9Lifecycle07ServiceA0V6SignalV3INTAEvpZ":{"name":"INT","abstract":"<p>Undocumented</p>","parent_name":"Signal"},"Structs/ServiceLifecycle/Signal.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Signal"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V13configurationA2C13ConfigurationV_tcfc":{"name":"init(configuration:)","abstract":"<p>Creates a <code><a href=\"36f8f5912051ae747ef441d6511ca4cbClasses/ComponentLifecycle.html\">ComponentLifecycle</a></code> instance.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V5startyyys5Error_pSgcF":{"name":"start(_:)","abstract":"<p>Starts the provided <code>LifecycleItem</code> array.","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V12startAndWaityyKF":{"name":"startAndWait()","abstract":"<p>Starts the provided <code>LifecycleItem</code> array and waits (blocking) until a shutdown <code><a href=\"36f8f5912051ae747ef441d6511ca4cbStructs/ServiceLifecycle/Signal.html\">Signal</a></code> is captured or <code>shutdown</code> is called on another thread.","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8shutdownyyys5Error_pSgcF":{"name":"shutdown(_:)","abstract":"<p>Shuts down the <code>LifecycleItem</code> array provided in <code>start</code> or <code>startAndWait</code>.","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V4waityyF":{"name":"wait()","abstract":"<p>Waits (blocking) until shutdown <code><a href=\"36f8f5912051ae747ef441d6511ca4cbStructs/ServiceLifecycle/Signal.html\">Signal</a></code> is captured or <code>shutdown</code> is invoked on another thread.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V4trap6signal7handler2on8Dispatch0G12SourceSignal_pAC0I0V_yAKcAH0G5QueueCtFZ":{"name":"trap(signal:handler:on:)","abstract":"<p>Setup a signal trap.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle/Signal.html":{"name":"Signal","abstract":"<p>A system signal</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8registeryyAA0A4Task_pd_tF":{"name":"register(_:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8registeryySayAA0A4Task_pGF":{"name":"register(_:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8register5label5start8shutdownySS_AA0A7HandlerVAItF":{"name":"register(label:start:shutdown:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V16registerShutdown5label_ySS_AA0A7HandlerVtF":{"name":"registerShutdown(label:_:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle/Configuration.html":{"name":"Configuration","abstract":"<p><code>Lifecycle</code> configuration options.</p>","parent_name":"ServiceLifecycle"},"Structs/LifecycleHandler.html#/s:9Lifecycle0A7HandlerVyACyys5Error_pSgcccfc":{"name":"init(_:)","abstract":"<p>Initialize a <code>Lifecycle.Handler</code> based Line truncated
|
||||
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"warnings": [
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 28,
|
||||
"symbol": "LifecycleTask.label",
|
||||
"symbol_kind": "source.lang.swift.decl.var.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 29,
|
||||
"symbol": "LifecycleTask.start(_:)",
|
||||
"symbol_kind": "source.lang.swift.decl.function.method.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 30,
|
||||
"symbol": "LifecycleTask.shutdown(_:)",
|
||||
"symbol_kind": "source.lang.swift.decl.function.method.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 84,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.struct",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 145,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.extension",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 167,
|
||||
"symbol": "ServiceLifecycle.Signal.TERM",
|
||||
"symbol_kind": "source.lang.swift.decl.var.static",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 168,
|
||||
"symbol": "ServiceLifecycle.Signal.INT",
|
||||
"symbol_kind": "source.lang.swift.decl.var.static",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 186,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.extension",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 223,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.extension",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 235,
|
||||
"symbol": "ServiceLifecycle.Configuration.init(logger:callbackQueue:shutdownSignal:installBacktrace:)",
|
||||
"symbol_kind": "source.lang.swift.decl.function.method.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 255,
|
||||
"symbol": "ComponentLifecycle.label",
|
||||
"symbol_kind": "source.lang.swift.decl.var.instance",
|
||||
"warning": "undocumented"
|
||||
}
|
||||
],
|
||||
"source_directory": "/code"
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Classes Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
|
||||
|
||||
<a title="Classes Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Classes Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Classes</h1>
|
||||
<p>The following classes are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ComponentLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ComponentLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ComponentLifecycle"></a>
|
||||
<h3 class="section-name"><p>ComponentLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C"></a>
|
||||
<a name="//apple_ref/swift/Class/ComponentLifecycle" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C">ComponentLifecycle</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>Lifecycle</code> provides a basic mechanism to cleanly startup and shutdown the application, freeing resources in order before exiting.</p>
|
||||
|
||||
<a href="Classes/ComponentLifecycle.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ComponentLifecycle</span> <span class="p">:</span> <span class="kt"><a href="Protocols/LifecycleTask.html">LifecycleTask</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L254-L464">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,690 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ComponentLifecycle Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Class/ComponentLifecycle" class="dashAnchor"></a>
|
||||
|
||||
<a title="ComponentLifecycle Class Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
ComponentLifecycle Class Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>ComponentLifecycle</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ComponentLifecycle</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>Lifecycle</code> provides a basic mechanism to cleanly startup and shutdown the application, freeing resources in order before exiting.</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L254-L464">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5labelSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/label" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5labelSSvp">label</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">label</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5label6loggerACSS_7Logging6LoggerVSgtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(label:logger:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5label6loggerACSS_7Logging6LoggerVSgtcfc">init(label:<wbr>logger:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Creates a <code>ComponentLifecycle</code> instance.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">logger</span><span class="p">:</span> <span class="kt">Logger</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>logger</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Logger</code> to log with.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L270-L274">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5startyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5startyyys5Error_pSgcF">start(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L281-L283">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C5start2on_y8Dispatch0E5QueueC_ys5Error_pSgctF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(on:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C5start2on_y8Dispatch0E5QueueC_ys5Error_pSgctF">start(on:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">on</span> <span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span><span class="p">,</span> <span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>on</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>DispatchQueue</code> to run the handlers callback on</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L291-L294">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C12startAndWait2ony8Dispatch0G5QueueC_tKF"></a>
|
||||
<a name="//apple_ref/swift/Method/startAndWait(on:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C12startAndWait2ony8Dispatch0G5QueueC_tKF">startAndWait(on:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array and waits (blocking) until <code>shutdown</code> is called on another thread.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">startAndWait</span><span class="p">(</span><span class="n">on</span> <span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span> <span class="o">=</span> <span class="o">.</span><span class="nf">global</span><span class="p">())</span> <span class="k">throws</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>on</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>DispatchQueue</code> to run the handlers callback on</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L301-L312">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8shutdownyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/shutdown(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8shutdownyyys5Error_pSgcF">shutdown(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Shuts down the <code>LifecycleItem</code> array provided in <code>start</code> or <code>startAndWait</code>.
|
||||
Shutdown is performed in reverse order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">shutdown</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span> <span class="o">=</span> <span class="p">{</span> <span class="n">_</span> <span class="k">in</span> <span class="p">})</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L316-L350">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C4waityyF"></a>
|
||||
<a name="//apple_ref/swift/Method/wait()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C4waityyF">wait()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Waits (blocking) until <code>shutdown</code> is invoked on another thread.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">wait</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L353-L355">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ComponentLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ComponentLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ComponentLifecycle"></a>
|
||||
<h3 class="section-name"><p>ComponentLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8registeryyAA0A4Task_pd_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8registeryyAA0A4Task_pd_tF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>one or more <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L485-L487">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8registeryySayAA0A4Task_pGF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8registeryySayAA0A4Task_pGF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="p">])</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>array of <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L493-L502">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C8register5label5start8shutdownySS_AA0A7HandlerVAItF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(label:start:shutdown:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C8register5label5start8shutdownySS_AA0A7HandlerVAItF">register(label:<wbr>start:<wbr>shutdown:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">start</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">,</span> <span class="nv">shutdown</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>start</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the startup.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>shutdown</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L510-L512">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle09ComponentA0C16registerShutdown5label_ySS_AA0A7HandlerVtF"></a>
|
||||
<a name="//apple_ref/swift/Method/registerShutdown(label:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle09ComponentA0C16registerShutdown5label_ySS_AA0A7HandlerVtF">registerShutdown(label:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">registerShutdown</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">handler</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>handler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L519-L521">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Protocols Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
|
||||
|
||||
<a title="Protocols Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Protocols Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Protocols</h1>
|
||||
<p>The following protocols are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/LifecycleTask"></a>
|
||||
<a name="//apple_ref/swift/Section/LifecycleTask" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/LifecycleTask"></a>
|
||||
<h3 class="section-name"><p>LifecycleTask</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/LifecycleTask" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP">LifecycleTask</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Represents an item that can be started and shut down</p>
|
||||
|
||||
<a href="Protocols/LifecycleTask.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">LifecycleTask</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L27-L31">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,221 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>LifecycleTask Protocol Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Protocol/LifecycleTask" class="dashAnchor"></a>
|
||||
|
||||
<a title="LifecycleTask Protocol Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
LifecycleTask Protocol Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>LifecycleTask</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">LifecycleTask</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Represents an item that can be started and shut down</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L27-L31">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP5labelSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/label" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP5labelSSvp">label</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">label</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP5startyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP5startyyys5Error_pSgcF">start(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A4TaskP8shutdownyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/shutdown(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A4TaskP8shutdownyyys5Error_pSgcF">shutdown(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">shutdown</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,205 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Structures Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
|
||||
|
||||
<a title="Structures Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Structures Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Structures</h1>
|
||||
<p>The following structures are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/LifecycleHandler"></a>
|
||||
<a name="//apple_ref/swift/Section/LifecycleHandler" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/LifecycleHandler"></a>
|
||||
<h3 class="section-name"><p>LifecycleHandler</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV"></a>
|
||||
<a name="//apple_ref/swift/Struct/LifecycleHandler" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV">LifecycleHandler</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Supported startup and shutdown method styles</p>
|
||||
|
||||
<a href="Structs/LifecycleHandler.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L36-L80">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ServiceLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ServiceLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ServiceLifecycle"></a>
|
||||
<h3 class="section-name"><p>ServiceLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V"></a>
|
||||
<a name="//apple_ref/swift/Struct/ServiceLifecycle" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V">ServiceLifecycle</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="Structs/ServiceLifecycle.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ServiceLifecycle</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L84-L143">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,308 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>LifecycleHandler Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/LifecycleHandler" class="dashAnchor"></a>
|
||||
|
||||
<a title="LifecycleHandler Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
LifecycleHandler Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>LifecycleHandler</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Supported startup and shutdown method styles</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L36-L80">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerVyACyys5Error_pSgcccfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerVyACyys5Error_pSgcccfc">init(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Initialize a <code>Lifecycle.Handler</code> based on a completion handler.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>the underlying completion handler</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L43-L45">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV5asyncyACyys5Error_pSgccFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/async(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV5asyncyACyys5Error_pSgccFZ">async(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Asynchronous <code>Lifecycle.Handler</code> based on a completion handler.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">async</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>the underlying completion handler</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L51-L53">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV4syncyACyyKcFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/sync(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV4syncyACyyKcFZ">sync(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Asynchronous <code>Lifecycle.Handler</code> based on a blocking, throwing function.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">sync</span><span class="p">(</span><span class="n">_</span> <span class="nv">body</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">()</span> <span class="k">throws</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span> <span class="o">-></span> <span class="kt">LifecycleHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>body</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>the underlying function</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L59-L68">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle0A7HandlerV4noneACvpZ"></a>
|
||||
<a name="//apple_ref/swift/Variable/none" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle0A7HandlerV4noneACvpZ">none</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Noop <code>Lifecycle.Handler</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">none</span><span class="p">:</span> <span class="kt">LifecycleHandler</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L71-L75">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,732 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ServiceLifecycle Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/ServiceLifecycle" class="dashAnchor"></a>
|
||||
|
||||
<a title="ServiceLifecycle Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
ServiceLifecycle Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>ServiceLifecycle</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ServiceLifecycle</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Undocumented</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L84-L143">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13configurationA2C13ConfigurationV_tcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(configuration:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13configurationA2C13ConfigurationV_tcfc">init(configuration:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Creates a <code><a href="../Classes/ComponentLifecycle.html">ComponentLifecycle</a></code> instance.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">configuration</span><span class="p">:</span> <span class="kt"><a href="../Structs/ServiceLifecycle/Configuration.html">Configuration</a></span> <span class="o">=</span> <span class="o">.</span><span class="nf">init</span><span class="p">())</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>configuration</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Defines lifecycle <code><a href="../Structs/ServiceLifecycle/Configuration.html">Configuration</a></code></p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L92-L100">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V5startyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/start(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V5startyyys5Error_pSgcF">start(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">start</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L107-L119">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V12startAndWaityyKF"></a>
|
||||
<a name="//apple_ref/swift/Method/startAndWait()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V12startAndWaityyKF">startAndWait()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Starts the provided <code>LifecycleItem</code> array and waits (blocking) until a shutdown <code><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></code> is captured or <code>shutdown</code> is called on another thread.
|
||||
Startup is performed in the order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">startAndWait</span><span class="p">()</span> <span class="k">throws</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>configuration</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Defines lifecycle <code><a href="../Structs/ServiceLifecycle/Configuration.html">Configuration</a></code></p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L126-L128">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8shutdownyyys5Error_pSgcF"></a>
|
||||
<a name="//apple_ref/swift/Method/shutdown(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8shutdownyyys5Error_pSgcF">shutdown(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Shuts down the <code>LifecycleItem</code> array provided in <code>start</code> or <code>startAndWait</code>.
|
||||
Shutdown is performed in reverse order of items provided.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">shutdown</span><span class="p">(</span><span class="n">_</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span> <span class="o">=</span> <span class="p">{</span> <span class="n">_</span> <span class="k">in</span> <span class="p">})</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>callback</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The handler which is called after the start operation completes. The parameter will be <code>nil</code> on success and contain the <code>Error</code> otherwise.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L135-L137">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V4waityyF"></a>
|
||||
<a name="//apple_ref/swift/Method/wait()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V4waityyF">wait()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Waits (blocking) until shutdown <code><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></code> is captured or <code>shutdown</code> is invoked on another thread.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">wait</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L140-L142">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/ServiceLifecycle"></a>
|
||||
<a name="//apple_ref/swift/Section/ServiceLifecycle" class="dashAnchor"></a>
|
||||
<div class="section-name-container">
|
||||
<a class="section-name-link" href="#/ServiceLifecycle"></a>
|
||||
<h3 class="section-name"><p>ServiceLifecycle</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V4trap6signal7handler2on8Dispatch0G12SourceSignal_pAC0I0V_yAKcAH0G5QueueCtFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/trap(signal:handler:on:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V4trap6signal7handler2on8Dispatch0G12SourceSignal_pAC0I0V_yAKcAH0G5QueueCtFZ">trap(signal:<wbr>handler:<wbr>on:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Setup a signal trap.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">trap</span><span class="p">(</span><span class="n">signal</span> <span class="nv">sig</span><span class="p">:</span> <span class="kt"><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">,</span> <span class="nv">handler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt"><a href="../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">,</span> <span class="n">on</span> <span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span> <span class="o">=</span> <span class="o">.</span><span class="nf">global</span><span class="p">())</span> <span class="o">-></span> <span class="kt">DispatchSourceSignal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>signal</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The signal to trap.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>handler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>closure to invoke when the signal is captured.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>a <code>DispatchSourceSignal</code> for the given trap. The source must be cancled by the caller.</p>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L152-L161">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V6SignalV"></a>
|
||||
<a name="//apple_ref/swift/Struct/Signal" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V6SignalV">Signal</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A system signal</p>
|
||||
|
||||
<a href="../Structs/ServiceLifecycle/Signal.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Signal</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L164-L183">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8registeryyAA0A4Task_pd_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8registeryyAA0A4Task_pd_tF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>one or more <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L191-L193">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8registeryySayAA0A4Task_pGF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8registeryySayAA0A4Task_pGF">register(_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="n">_</span> <span class="nv">tasks</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/LifecycleTask.html">LifecycleTask</a></span><span class="p">])</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>tasks</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>array of <code>Tasks</code>.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L199-L201">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V8register5label5start8shutdownySS_AA0A7HandlerVAItF"></a>
|
||||
<a name="//apple_ref/swift/Method/register(label:start:shutdown:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V8register5label5start8shutdownySS_AA0A7HandlerVAItF">register(label:<wbr>start:<wbr>shutdown:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">register</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">start</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">,</span> <span class="nv">shutdown</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>start</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the startup.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>shutdown</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L209-L211">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V16registerShutdown5label_ySS_AA0A7HandlerVtF"></a>
|
||||
<a name="//apple_ref/swift/Method/registerShutdown(label:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V16registerShutdown5label_ySS_AA0A7HandlerVtF">registerShutdown(label:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">registerShutdown</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">handler</span><span class="p">:</span> <span class="kt"><a href="../Structs/LifecycleHandler.html">LifecycleHandler</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>label</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>label of the item, useful for debugging.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>handler</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p><code>Handler</code> to perform the shutdown.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L218-L220">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV"></a>
|
||||
<a name="//apple_ref/swift/Struct/Configuration" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV">Configuration</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p><code>Lifecycle</code> configuration options.</p>
|
||||
|
||||
<a href="../Structs/ServiceLifecycle/Configuration.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Configuration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L225-L244">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,284 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Configuration Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../../js/jquery.min.js" defer></script>
|
||||
<script src="../../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../../js/lunr.min.js" defer></script>
|
||||
<script src="../../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/Configuration" class="dashAnchor"></a>
|
||||
|
||||
<a title="Configuration Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../../img/carat.png" />
|
||||
Configuration Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Configuration</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Configuration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><code>Lifecycle</code> configuration options.</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L225-L244">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV6logger7Logging6LoggerVvp"></a>
|
||||
<a name="//apple_ref/swift/Property/logger" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger7Logging6LoggerVvp">logger</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines the <code>Logger</code> to log with.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">logger</span><span class="p">:</span> <span class="kt">Logger</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L227">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV13callbackQueue8Dispatch0fE0Cvp"></a>
|
||||
<a name="//apple_ref/swift/Property/callbackQueue" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV13callbackQueue8Dispatch0fE0Cvp">callbackQueue</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines the <code>DispatchQueue</code> on which startup and shutdown callback handlers are run.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">callbackQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L229">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV14shutdownSignalSayAC0E0VGSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/shutdownSignal" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV14shutdownSignalSayAC0E0VGSgvp">shutdownSignal</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines if to install a crash signal trap that prints backtraces.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">shutdownSignal</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a></span><span class="o">.</span><span class="kt"><a href="../../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">]?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L231">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV16installBacktraceSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/installBacktrace" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV16installBacktraceSbvp">installBacktrace</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines what, if any, signals to trap for invoking shutdown.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">installBacktrace</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L233">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V13ConfigurationV6logger13callbackQueue14shutdownSignal16installBacktraceAE7Logging6LoggerV_8Dispatch0mF0CSayAC0H0VGSgSbtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(logger:callbackQueue:shutdownSignal:installBacktrace:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger13callbackQueue14shutdownSignal16installBacktraceAE7Logging6LoggerV_8Dispatch0mF0CSayAC0H0VGSgSbtcfc">init(logger:<wbr>callbackQueue:<wbr>shutdownSignal:<wbr>installBacktrace:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">logger</span><span class="p">:</span> <span class="kt">Logger</span> <span class="o">=</span> <span class="kt">Logger</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="s">"Lifeycle"</span><span class="p">),</span>
|
||||
<span class="nv">callbackQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span> <span class="o">=</span> <span class="o">.</span><span class="nf">global</span><span class="p">(),</span>
|
||||
<span class="nv">shutdownSignal</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../../Structs/ServiceLifecycle/Signal.html">Signal</a></span><span class="p">]?</span> <span class="o">=</span> <span class="p">[</span><span class="o">.</span><span class="kt">TERM</span><span class="p">,</span> <span class="o">.</span><span class="kt">INT</span><span class="p">],</span>
|
||||
<span class="nv">installBacktrace</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L235-L243">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,220 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Signal Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../../js/jquery.min.js" defer></script>
|
||||
<script src="../../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../../js/lunr.min.js" defer></script>
|
||||
<script src="../../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/Signal" class="dashAnchor"></a>
|
||||
|
||||
<a title="Signal Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../../index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="../../img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../../index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="../../img/carat.png" />
|
||||
Signal Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Signal</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Signal</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>A system signal</p>
|
||||
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L164-L183">Show on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V6SignalV4TERMAEvpZ"></a>
|
||||
<a name="//apple_ref/swift/Variable/TERM" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V6SignalV4TERMAEvpZ">TERM</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">TERM</span><span class="p">:</span> <span class="kt"><a href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a></span><span class="o">.</span><span class="kt">Signal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9Lifecycle07ServiceA0V6SignalV3INTAEvpZ"></a>
|
||||
<a name="//apple_ref/swift/Variable/INT" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9Lifecycle07ServiceA0V6SignalV3INTAEvpZ">INT</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">INT</span><span class="p">:</span> <span class="kt"><a href="../../Structs/ServiceLifecycle.html">ServiceLifecycle</a></span><span class="o">.</span><span class="kt">Signal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="slightly-smaller">
|
||||
<a href="https://github.com/swift-server/swift-service-lifecycle/tree/1.0.0-alpha.4/Sources/Lifecycle/Lifecycle.swift#L172-L182">Show on GitHub</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="128" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h93v20H0z"/>
|
||||
<path fill="#a4a61d" d="M93 0h35v20H93z"/>
|
||||
<path fill="url(#b)" d="M0 0h128v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="830">
|
||||
documentation
|
||||
</text>
|
||||
<text x="475" y="140" transform="scale(.1)" textLength="830">
|
||||
documentation
|
||||
</text>
|
||||
<text x="1095" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">
|
||||
76%
|
||||
</text>
|
||||
<text x="1095" y="140" transform="scale(.1)" textLength="250">
|
||||
76%
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,200 @@
|
||||
/* Credit to https://gist.github.com/wataru420/2048287 */
|
||||
.highlight {
|
||||
/* Comment */
|
||||
/* Error */
|
||||
/* Keyword */
|
||||
/* Operator */
|
||||
/* Comment.Multiline */
|
||||
/* Comment.Preproc */
|
||||
/* Comment.Single */
|
||||
/* Comment.Special */
|
||||
/* Generic.Deleted */
|
||||
/* Generic.Deleted.Specific */
|
||||
/* Generic.Emph */
|
||||
/* Generic.Error */
|
||||
/* Generic.Heading */
|
||||
/* Generic.Inserted */
|
||||
/* Generic.Inserted.Specific */
|
||||
/* Generic.Output */
|
||||
/* Generic.Prompt */
|
||||
/* Generic.Strong */
|
||||
/* Generic.Subheading */
|
||||
/* Generic.Traceback */
|
||||
/* Keyword.Constant */
|
||||
/* Keyword.Declaration */
|
||||
/* Keyword.Pseudo */
|
||||
/* Keyword.Reserved */
|
||||
/* Keyword.Type */
|
||||
/* Literal.Number */
|
||||
/* Literal.String */
|
||||
/* Name.Attribute */
|
||||
/* Name.Builtin */
|
||||
/* Name.Class */
|
||||
/* Name.Constant */
|
||||
/* Name.Entity */
|
||||
/* Name.Exception */
|
||||
/* Name.Function */
|
||||
/* Name.Namespace */
|
||||
/* Name.Tag */
|
||||
/* Name.Variable */
|
||||
/* Operator.Word */
|
||||
/* Text.Whitespace */
|
||||
/* Literal.Number.Float */
|
||||
/* Literal.Number.Hex */
|
||||
/* Literal.Number.Integer */
|
||||
/* Literal.Number.Oct */
|
||||
/* Literal.String.Backtick */
|
||||
/* Literal.String.Char */
|
||||
/* Literal.String.Doc */
|
||||
/* Literal.String.Double */
|
||||
/* Literal.String.Escape */
|
||||
/* Literal.String.Heredoc */
|
||||
/* Literal.String.Interpol */
|
||||
/* Literal.String.Other */
|
||||
/* Literal.String.Regex */
|
||||
/* Literal.String.Single */
|
||||
/* Literal.String.Symbol */
|
||||
/* Name.Builtin.Pseudo */
|
||||
/* Name.Variable.Class */
|
||||
/* Name.Variable.Global */
|
||||
/* Name.Variable.Instance */
|
||||
/* Literal.Number.Integer.Long */ }
|
||||
.highlight .c {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2; }
|
||||
.highlight .k {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .o {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .cm {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cp {
|
||||
color: #999999;
|
||||
font-weight: bold; }
|
||||
.highlight .c1 {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cs {
|
||||
color: #999999;
|
||||
font-weight: bold;
|
||||
font-style: italic; }
|
||||
.highlight .gd {
|
||||
color: #000000;
|
||||
background-color: #ffdddd; }
|
||||
.highlight .gd .x {
|
||||
color: #000000;
|
||||
background-color: #ffaaaa; }
|
||||
.highlight .ge {
|
||||
color: #000000;
|
||||
font-style: italic; }
|
||||
.highlight .gr {
|
||||
color: #aa0000; }
|
||||
.highlight .gh {
|
||||
color: #999999; }
|
||||
.highlight .gi {
|
||||
color: #000000;
|
||||
background-color: #ddffdd; }
|
||||
.highlight .gi .x {
|
||||
color: #000000;
|
||||
background-color: #aaffaa; }
|
||||
.highlight .go {
|
||||
color: #888888; }
|
||||
.highlight .gp {
|
||||
color: #555555; }
|
||||
.highlight .gs {
|
||||
font-weight: bold; }
|
||||
.highlight .gu {
|
||||
color: #aaaaaa; }
|
||||
.highlight .gt {
|
||||
color: #aa0000; }
|
||||
.highlight .kc {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kd {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kp {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kr {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kt {
|
||||
color: #445588; }
|
||||
.highlight .m {
|
||||
color: #009999; }
|
||||
.highlight .s {
|
||||
color: #d14; }
|
||||
.highlight .na {
|
||||
color: #008080; }
|
||||
.highlight .nb {
|
||||
color: #0086B3; }
|
||||
.highlight .nc {
|
||||
color: #445588;
|
||||
font-weight: bold; }
|
||||
.highlight .no {
|
||||
color: #008080; }
|
||||
.highlight .ni {
|
||||
color: #800080; }
|
||||
.highlight .ne {
|
||||
color: #990000;
|
||||
font-weight: bold; }
|
||||
.highlight .nf {
|
||||
color: #990000; }
|
||||
.highlight .nn {
|
||||
color: #555555; }
|
||||
.highlight .nt {
|
||||
color: #000080; }
|
||||
.highlight .nv {
|
||||
color: #008080; }
|
||||
.highlight .ow {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .w {
|
||||
color: #bbbbbb; }
|
||||
.highlight .mf {
|
||||
color: #009999; }
|
||||
.highlight .mh {
|
||||
color: #009999; }
|
||||
.highlight .mi {
|
||||
color: #009999; }
|
||||
.highlight .mo {
|
||||
color: #009999; }
|
||||
.highlight .sb {
|
||||
color: #d14; }
|
||||
.highlight .sc {
|
||||
color: #d14; }
|
||||
.highlight .sd {
|
||||
color: #d14; }
|
||||
.highlight .s2 {
|
||||
color: #d14; }
|
||||
.highlight .se {
|
||||
color: #d14; }
|
||||
.highlight .sh {
|
||||
color: #d14; }
|
||||
.highlight .si {
|
||||
color: #d14; }
|
||||
.highlight .sx {
|
||||
color: #d14; }
|
||||
.highlight .sr {
|
||||
color: #009926; }
|
||||
.highlight .s1 {
|
||||
color: #d14; }
|
||||
.highlight .ss {
|
||||
color: #990073; }
|
||||
.highlight .bp {
|
||||
color: #999999; }
|
||||
.highlight .vc {
|
||||
color: #008080; }
|
||||
.highlight .vg {
|
||||
color: #008080; }
|
||||
.highlight .vi {
|
||||
color: #008080; }
|
||||
.highlight .il {
|
||||
color: #009999; }
|
||||
@@ -0,0 +1,395 @@
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
letter-spacing: .2px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
box-sizing: border-box; }
|
||||
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.6em; }
|
||||
|
||||
h2 {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.3em; }
|
||||
|
||||
h3 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
margin: 1em 0 0.3em; }
|
||||
|
||||
h4 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.85em; }
|
||||
|
||||
h5 {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.85em; }
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin: 1.275em 0 0.85em;
|
||||
color: #777; }
|
||||
|
||||
p {
|
||||
margin: 0 0 1em; }
|
||||
|
||||
ul, ol {
|
||||
padding: 0 0 0 2em;
|
||||
margin: 0 0 0.85em; }
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 0.85em;
|
||||
padding: 0 15px;
|
||||
color: #858585;
|
||||
border-left: 4px solid #e5e5e5; }
|
||||
|
||||
img {
|
||||
max-width: 100%; }
|
||||
|
||||
a {
|
||||
color: #4183c4;
|
||||
text-decoration: none; }
|
||||
a:hover, a:focus {
|
||||
outline: 0;
|
||||
text-decoration: underline; }
|
||||
a.discouraged {
|
||||
text-decoration: line-through; }
|
||||
a.discouraged:hover, a.discouraged:focus {
|
||||
text-decoration: underline line-through; }
|
||||
|
||||
table {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
overflow: auto;
|
||||
margin: 0 0 0.85em; }
|
||||
|
||||
tr:nth-child(2n) {
|
||||
background-color: #fbfbfb; }
|
||||
|
||||
th, td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
pre {
|
||||
margin: 0 0 1.275em;
|
||||
padding: .85em 1em;
|
||||
overflow: auto;
|
||||
background: #f7f7f7;
|
||||
font-size: .85em;
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||
|
||||
code {
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||
|
||||
.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code {
|
||||
background: #f7f7f7;
|
||||
padding: .2em; }
|
||||
.item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after {
|
||||
letter-spacing: -.2em;
|
||||
content: "\00a0"; }
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
white-space: pre; }
|
||||
|
||||
.content-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column; }
|
||||
@media (min-width: 768px) {
|
||||
.content-wrapper {
|
||||
flex-direction: row; } }
|
||||
.header {
|
||||
display: flex;
|
||||
padding: 8px;
|
||||
font-size: 0.875em;
|
||||
background: #444;
|
||||
color: #999; }
|
||||
|
||||
.header-col {
|
||||
margin: 0;
|
||||
padding: 0 8px; }
|
||||
|
||||
.header-col--primary {
|
||||
flex: 1; }
|
||||
|
||||
.header-link {
|
||||
color: #fff; }
|
||||
|
||||
.header-icon {
|
||||
padding-right: 6px;
|
||||
vertical-align: -4px;
|
||||
height: 16px; }
|
||||
|
||||
.breadcrumbs {
|
||||
font-size: 0.875em;
|
||||
padding: 8px 16px;
|
||||
margin: 0;
|
||||
background: #fbfbfb;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
|
||||
.carat {
|
||||
height: 10px;
|
||||
margin: 0 5px; }
|
||||
|
||||
.navigation {
|
||||
order: 2; }
|
||||
@media (min-width: 768px) {
|
||||
.navigation {
|
||||
order: 1;
|
||||
width: 25%;
|
||||
max-width: 300px;
|
||||
padding-bottom: 64px;
|
||||
overflow: hidden;
|
||||
word-wrap: normal;
|
||||
background: #fbfbfb;
|
||||
border-right: 1px solid #ddd; } }
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
padding-left: 0; }
|
||||
|
||||
.nav-group-name {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 8px 0 8px 16px; }
|
||||
|
||||
.nav-group-name-link {
|
||||
color: #333; }
|
||||
|
||||
.nav-group-tasks {
|
||||
margin: 8px 0;
|
||||
padding: 0 0 0 8px; }
|
||||
|
||||
.nav-group-task {
|
||||
font-size: 1em;
|
||||
list-style-type: none;
|
||||
white-space: nowrap; }
|
||||
|
||||
.nav-group-task-link {
|
||||
color: #808080; }
|
||||
|
||||
.main-content {
|
||||
order: 1; }
|
||||
@media (min-width: 768px) {
|
||||
.main-content {
|
||||
order: 2;
|
||||
flex: 1;
|
||||
padding-bottom: 60px; } }
|
||||
.section {
|
||||
padding: 0 32px;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
|
||||
.section-content {
|
||||
max-width: 834px;
|
||||
margin: 0 auto;
|
||||
padding: 16px 0; }
|
||||
|
||||
.section-name {
|
||||
color: #666;
|
||||
display: block; }
|
||||
.section-name p {
|
||||
margin-bottom: inherit; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
padding: 8px 0;
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
border: none; }
|
||||
|
||||
.task-group-section {
|
||||
border-top: 1px solid #ddd; }
|
||||
|
||||
.task-group {
|
||||
padding-top: 0px; }
|
||||
|
||||
.task-name-container a[name]:before {
|
||||
content: "";
|
||||
display: block; }
|
||||
|
||||
.section-name-container {
|
||||
position: relative; }
|
||||
.section-name-container .section-name-link {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin-bottom: 0; }
|
||||
.section-name-container .section-name {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
z-index: 1; }
|
||||
.section-name-container .section-name a {
|
||||
pointer-events: auto; }
|
||||
|
||||
.item-container {
|
||||
padding: 0; }
|
||||
|
||||
.item {
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
list-style-type: none; }
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block; }
|
||||
.item .token, .item .direct-link {
|
||||
display: inline-block;
|
||||
text-indent: -20px;
|
||||
padding-left: 3px;
|
||||
margin-left: 20px;
|
||||
font-size: 1rem; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
color: #808080;
|
||||
font-style: italic; }
|
||||
|
||||
.pointer-container {
|
||||
border-bottom: 1px solid #ddd;
|
||||
left: -23px;
|
||||
padding-bottom: 13px;
|
||||
position: relative;
|
||||
width: 110%; }
|
||||
|
||||
.pointer {
|
||||
left: 21px;
|
||||
top: 7px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-left: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd;
|
||||
background: #fff;
|
||||
transform: rotate(45deg); }
|
||||
|
||||
.height-container {
|
||||
display: none;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden; }
|
||||
.height-container .section {
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-top-width: 0;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px;
|
||||
padding: 8px 16px; }
|
||||
|
||||
.aside, .language {
|
||||
padding: 6px 12px;
|
||||
margin: 12px 0;
|
||||
border-left: 5px solid #dddddd;
|
||||
overflow-y: hidden; }
|
||||
.aside .aside-title, .language .aside-title {
|
||||
font-size: 9px;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
padding-bottom: 0;
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
-webkit-user-select: none; }
|
||||
.aside p:last-child, .language p:last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.language {
|
||||
border-left: 5px solid #cde9f4; }
|
||||
.language .aside-title {
|
||||
color: #4183c4; }
|
||||
|
||||
.aside-warning, .aside-deprecated, .aside-unavailable {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
border-collapse: collapse;
|
||||
width: 100%; }
|
||||
.graybox p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
min-width: 50px; }
|
||||
.graybox td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 5px 25px 5px 10px;
|
||||
vertical-align: middle; }
|
||||
.graybox tr td:first-of-type {
|
||||
text-align: right;
|
||||
padding: 7px;
|
||||
vertical-align: top;
|
||||
word-break: normal;
|
||||
width: 40px; }
|
||||
|
||||
.slightly-smaller {
|
||||
font-size: 0.9em; }
|
||||
|
||||
.footer {
|
||||
padding: 8px 16px;
|
||||
background: #444;
|
||||
color: #ddd;
|
||||
font-size: 0.8em; }
|
||||
.footer p {
|
||||
margin: 8px 0; }
|
||||
.footer a {
|
||||
color: #fff; }
|
||||
|
||||
html.dash .header, html.dash .breadcrumbs, html.dash .navigation {
|
||||
display: none; }
|
||||
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
|
||||
form[role=search] input {
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
padding: 0 10px;
|
||||
margin: 0;
|
||||
border: none;
|
||||
border-radius: 1em; }
|
||||
.loading form[role=search] input {
|
||||
background: white url(../img/spinner.gif) center right 4px no-repeat; }
|
||||
|
||||
form[role=search] .tt-menu {
|
||||
margin: 0;
|
||||
min-width: 300px;
|
||||
background: #fbfbfb;
|
||||
color: #333;
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
form[role=search] .tt-highlight {
|
||||
font-weight: bold; }
|
||||
|
||||
form[role=search] .tt-suggestion {
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
padding: 0 8px; }
|
||||
form[role=search] .tt-suggestion span {
|
||||
display: table-cell;
|
||||
white-space: nowrap; }
|
||||
form[role=search] .tt-suggestion .doc-parent-name {
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
font-weight: normal;
|
||||
font-size: 0.9em;
|
||||
padding-left: 16px; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover,
|
||||
form[role=search] .tt-suggestion.tt-cursor {
|
||||
cursor: pointer;
|
||||
background-color: #4183c4;
|
||||
color: #fff; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover .doc-parent-name,
|
||||
form[role=search] .tt-suggestion.tt-cursor .doc-parent-name {
|
||||
color: #fff; }
|
||||
|
After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Lifecycle Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<a title="Lifecycle Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
Lifecycle 1.0.0-alpha.4 Docs
|
||||
</a>
|
||||
(76% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/swift-server/swift-service-lifecycle">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="dash-feed://https%3A%2F%2Fswift-server.github.io%2Fswift-service-lifecycle%2Fdocs%2F1.0.0-alpha.4%2FLifecycle%2Fdocsets%2FLifecycle.xml">
|
||||
<img class="header-icon" src="img/dash.png"/>
|
||||
Install in Dash
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">Lifecycle Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Lifecycle Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/ComponentLifecycle.html">ComponentLifecycle</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/LifecycleTask.html">LifecycleTask</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/LifecycleHandler.html">LifecycleHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle.html">ServiceLifecycle</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Signal.html">– Signal</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/ServiceLifecycle/Configuration.html">– Configuration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content top-matter">
|
||||
|
||||
<h1 id='swiftservicelifecycle-docs' class='heading'>SwiftServiceLifecycle Docs</h1>
|
||||
|
||||
<p>SwiftServiceLifecycle provides a basic mechanism to cleanly start up and shut down the application, freeing resources in order before exiting.
|
||||
It also provides a Signal based shutdown hook, to shutdown on signals like TERM or INT.</p>
|
||||
|
||||
<p>SwiftServiceLifecycle is non-framework specific, designed to be integrated with any server framework or directly in an application.</p>
|
||||
|
||||
<p>To get started with SwiftServiceLifecycle, <a href="../Lifecycle/index.html"><code>import Lifecycle</code></a>.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2020 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2020-07-15)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
window.jazzy = {'docset': false}
|
||||
if (typeof window.dash != 'undefined') {
|
||||
document.documentElement.className += ' dash'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
if (navigator.userAgent.match(/xcode/i)) {
|
||||
document.documentElement.className += ' xcode'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
function toggleItem($link, $content) {
|
||||
var animationDuration = 300;
|
||||
$link.toggleClass('token-open');
|
||||
$content.slideToggle(animationDuration);
|
||||
}
|
||||
|
||||
function itemLinkToContent($link) {
|
||||
return $link.parent().parent().next();
|
||||
}
|
||||
|
||||
// On doc load + hash-change, open any targetted item
|
||||
function openCurrentItemIfClosed() {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token');
|
||||
$content = itemLinkToContent($link);
|
||||
if ($content.is(':hidden')) {
|
||||
toggleItem($link, $content);
|
||||
}
|
||||
}
|
||||
|
||||
$(openCurrentItemIfClosed);
|
||||
$(window).on('hashchange', openCurrentItemIfClosed);
|
||||
|
||||
// On item link ('token') click, toggle its discussion
|
||||
$('.token').on('click', function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var $link = $(this);
|
||||
toggleItem($link, itemLinkToContent($link));
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $link.attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
location.hash = href;
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
// Clicks on links to the current, closed, item need to open the item
|
||||
$("a:not('.token')").on('click', function() {
|
||||
if (location == this.href) {
|
||||
openCurrentItemIfClosed();
|
||||
}
|
||||
});
|
||||
|
||||
// KaTeX rendering
|
||||
if ("katex" in window) {
|
||||
$($('.math').each( (_, element) => {
|
||||
katex.render(element.textContent, element, {
|
||||
displayMode: $(element).hasClass('m-block'),
|
||||
throwOnError: false,
|
||||
trust: true
|
||||
});
|
||||
}))
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
$(function(){
|
||||
var $typeahead = $('[data-typeahead]');
|
||||
var $form = $typeahead.parents('form');
|
||||
var searchURL = $form.attr('action');
|
||||
|
||||
function displayTemplate(result) {
|
||||
return result.name;
|
||||
}
|
||||
|
||||
function suggestionTemplate(result) {
|
||||
var t = '<div class="list-group-item clearfix">';
|
||||
t += '<span class="doc-name">' + result.name + '</span>';
|
||||
if (result.parent_name) {
|
||||
t += '<span class="doc-parent-name label">' + result.parent_name + '</span>';
|
||||
}
|
||||
t += '</div>';
|
||||
return t;
|
||||
}
|
||||
|
||||
$typeahead.one('focus', function() {
|
||||
$form.addClass('loading');
|
||||
|
||||
$.getJSON(searchURL).then(function(searchData) {
|
||||
const searchIndex = lunr(function() {
|
||||
this.ref('url');
|
||||
this.field('name');
|
||||
this.field('abstract');
|
||||
for (const [url, doc] of Object.entries(searchData)) {
|
||||
this.add({url: url, name: doc.name, abstract: doc.abstract});
|
||||
}
|
||||
});
|
||||
|
||||
$typeahead.typeahead(
|
||||
{
|
||||
highlight: true,
|
||||
minLength: 3,
|
||||
autoselect: true
|
||||
},
|
||||
{
|
||||
limit: 10,
|
||||
display: displayTemplate,
|
||||
templates: { suggestion: suggestionTemplate },
|
||||
source: function(query, sync) {
|
||||
const lcSearch = query.toLowerCase();
|
||||
const results = searchIndex.query(function(q) {
|
||||
q.term(lcSearch, { boost: 100 });
|
||||
q.term(lcSearch, {
|
||||
boost: 10,
|
||||
wildcard: lunr.Query.wildcard.TRAILING
|
||||
});
|
||||
}).map(function(result) {
|
||||
var doc = searchData[result.ref];
|
||||
doc.url = result.ref;
|
||||
return doc;
|
||||
});
|
||||
sync(results);
|
||||
}
|
||||
}
|
||||
);
|
||||
$form.removeClass('loading');
|
||||
$typeahead.trigger('focus');
|
||||
});
|
||||
});
|
||||
|
||||
var baseURL = searchURL.slice(0, -"search.json".length);
|
||||
|
||||
$typeahead.on('typeahead:select', function(e, result) {
|
||||
window.location = baseURL + result.url;
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-lLine truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.7
|
||||
* Copyright (C) 2019 Oliver Nightingale
|
||||
* @license MIT
|
||||
*/
|
||||
!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.7",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var n=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[n]=s}}return t},e.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var r=t.indexOf(e.FieldRef.joiner);if(r===-1)throw"malformed field ref string";var i=t.slice(0,r),n=t.slice(r+1);return new e.FieldRef(n,i,t)},e.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue},e.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},e.Set.complete={intersect:function(e){return e},union:function(e){return e},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},e.Set.prototype.contains=function(e){return!!this.elements[e]},e.Set.prototype.intersect=function(t){var r,i,n,s=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(r=this,i=t):(r=t,i=this),n=Object.keys(r.elements);for(var o=0;o<n.length;o++){var a=n[o];a in i.elements&&s.push(a)}return new e.Set(s)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},e.Token=function(e,t){this.str=e||"",this.metadata=t||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(e){return e},new e.Token(t(this.str,this.metadata),this.metadata)},e.tokenizer=function(t,r){if(null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return new e.Token(e.utils.asString(t).toLowerCase(),e.utils.clone(r))});for(var i=t.toString().toLowerCase(),n=i.length,s=[],o=0,a=0;o<=n;o++){var u=i.charAt(o),l=o-a;if(u.match(e.tokenizer.separator)||o==n){if(l>0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var i=this._stack[r],n=[],s=0;s<e.length;s++){var o=i(e[s],s,e);if(null!==o&&void 0!==o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)n.push(o[a]);else n.push(o)}e=n}return e},e.Pipeline.prototype.runString=function(t,r){var i=new e.Token(t,r);return this.run([i]).map(function(e){return e.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(e){this._magnitude=0,this.elements=e||[]},e.Vector.prototype.positionForIndex=function(e){if(0==this.elements.Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger7Logging6LoggerVvp":{"name":"logger","abstract":"<p>Defines the <code>Logger</code> to log with.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV13callbackQueue8Dispatch0fE0Cvp":{"name":"callbackQueue","abstract":"<p>Defines the <code>DispatchQueue</code> on which startup and shutdown callback handlers are run.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV14shutdownSignalSayAC0E0VGSgvp":{"name":"shutdownSignal","abstract":"<p>Defines if to install a crash signal trap that prints backtraces.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV16installBacktraceSbvp":{"name":"installBacktrace","abstract":"<p>Defines what, if any, signals to trap for invoking shutdown.</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Configuration.html#/s:9Lifecycle07ServiceA0V13ConfigurationV6logger13callbackQueue14shutdownSignal16installBacktraceAE7Logging6LoggerV_8Dispatch0mF0CSayAC0H0VGSgSbtcfc":{"name":"init(logger:callbackQueue:shutdownSignal:installBacktrace:)","abstract":"<p>Undocumented</p>","parent_name":"Configuration"},"Structs/ServiceLifecycle/Signal.html#/s:9Lifecycle07ServiceA0V6SignalV4TERMAEvpZ":{"name":"TERM","abstract":"<p>Undocumented</p>","parent_name":"Signal"},"Structs/ServiceLifecycle/Signal.html#/s:9Lifecycle07ServiceA0V6SignalV3INTAEvpZ":{"name":"INT","abstract":"<p>Undocumented</p>","parent_name":"Signal"},"Structs/ServiceLifecycle/Signal.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Signal"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V13configurationA2C13ConfigurationV_tcfc":{"name":"init(configuration:)","abstract":"<p>Creates a <code><a href=\"36f8f5912051ae747ef441d6511ca4cbClasses/ComponentLifecycle.html\">ComponentLifecycle</a></code> instance.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V5startyyys5Error_pSgcF":{"name":"start(_:)","abstract":"<p>Starts the provided <code>LifecycleItem</code> array.","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V12startAndWaityyKF":{"name":"startAndWait()","abstract":"<p>Starts the provided <code>LifecycleItem</code> array and waits (blocking) until a shutdown <code><a href=\"36f8f5912051ae747ef441d6511ca4cbStructs/ServiceLifecycle/Signal.html\">Signal</a></code> is captured or <code>shutdown</code> is called on another thread.","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8shutdownyyys5Error_pSgcF":{"name":"shutdown(_:)","abstract":"<p>Shuts down the <code>LifecycleItem</code> array provided in <code>start</code> or <code>startAndWait</code>.","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V4waityyF":{"name":"wait()","abstract":"<p>Waits (blocking) until shutdown <code><a href=\"36f8f5912051ae747ef441d6511ca4cbStructs/ServiceLifecycle/Signal.html\">Signal</a></code> is captured or <code>shutdown</code> is invoked on another thread.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V4trap6signal7handler2on8Dispatch0G12SourceSignal_pAC0I0V_yAKcAH0G5QueueCtFZ":{"name":"trap(signal:handler:on:)","abstract":"<p>Setup a signal trap.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle/Signal.html":{"name":"Signal","abstract":"<p>A system signal</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8registeryyAA0A4Task_pd_tF":{"name":"register(_:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8registeryySayAA0A4Task_pGF":{"name":"register(_:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V8register5label5start8shutdownySS_AA0A7HandlerVAItF":{"name":"register(label:start:shutdown:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle.html#/s:9Lifecycle07ServiceA0V16registerShutdown5label_ySS_AA0A7HandlerVtF":{"name":"registerShutdown(label:_:)","abstract":"<p>Adds a <code>Task</code> to a <code>Tasks</code> collection.</p>","parent_name":"ServiceLifecycle"},"Structs/ServiceLifecycle/Configuration.html":{"name":"Configuration","abstract":"<p><code>Lifecycle</code> configuration options.</p>","parent_name":"ServiceLifecycle"},"Structs/LifecycleHandler.html#/s:9Lifecycle0A7HandlerVyACyys5Error_pSgcccfc":{"name":"init(_:)","abstract":"<p>Initialize a <code>Lifecycle.Handler</code> based Line truncated
|
||||
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"warnings": [
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 28,
|
||||
"symbol": "LifecycleTask.label",
|
||||
"symbol_kind": "source.lang.swift.decl.var.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 29,
|
||||
"symbol": "LifecycleTask.start(_:)",
|
||||
"symbol_kind": "source.lang.swift.decl.function.method.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 30,
|
||||
"symbol": "LifecycleTask.shutdown(_:)",
|
||||
"symbol_kind": "source.lang.swift.decl.function.method.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 84,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.struct",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 145,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.extension",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 167,
|
||||
"symbol": "ServiceLifecycle.Signal.TERM",
|
||||
"symbol_kind": "source.lang.swift.decl.var.static",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 168,
|
||||
"symbol": "ServiceLifecycle.Signal.INT",
|
||||
"symbol_kind": "source.lang.swift.decl.var.static",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 186,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.extension",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 223,
|
||||
"symbol": "ServiceLifecycle",
|
||||
"symbol_kind": "source.lang.swift.decl.extension",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 235,
|
||||
"symbol": "ServiceLifecycle.Configuration.init(logger:callbackQueue:shutdownSignal:installBacktrace:)",
|
||||
"symbol_kind": "source.lang.swift.decl.function.method.instance",
|
||||
"warning": "undocumented"
|
||||
},
|
||||
{
|
||||
"file": "/code/Sources/Lifecycle/Lifecycle.swift",
|
||||
"line": 255,
|
||||
"symbol": "ComponentLifecycle.label",
|
||||
"symbol_kind": "source.lang.swift.decl.var.instance",
|
||||
"warning": "undocumented"
|
||||
}
|
||||
],
|
||||
"source_directory": "/code"
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
hello world
|
||||
<html><head><meta http-equiv="refresh" content="0; url=docs/current/Lifecycle/index.html" /></head></html>
|
||||