Files
swift-service-lifecycle/docs/current/Lifecycle/Protocols/LifecycleTask.html
T

268 lines
13 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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.10 Docs
</a>
(79% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<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" alt="GitHub"/>
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.10%2FLifecycle%2Fdocsets%2FLifecycle.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
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" alt=""/>
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>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/LifecycleTasksContainer.html">LifecycleTasksContainer</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/LifecycleShutdownHandler.html">LifecycleShutdownHandler</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/LifecycleStartHandler.html">LifecycleStartHandler</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.10/Sources/Lifecycle/Lifecycle.swift#L28-L33">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.10/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9Lifecycle0A4TaskP20shutdownIfNotStartedSbvp"></a>
<a name="//apple_ref/swift/Property/shutdownIfNotStarted" class="dashAnchor"></a>
<a class="token" href="#/s:9Lifecycle0A4TaskP20shutdownIfNotStartedSbvp">shutdownIfNotStarted</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl 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">shutdownIfNotStarted</span><span class="p">:</span> <span class="kt">Bool</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.10/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">-&gt;</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.10/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">-&gt;</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.10/Sources/Lifecycle/Lifecycle.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://github.com/swift-server/swift-service-lifecycle" target="_blank" rel="external noopener">SwiftServiceLifecycle team</a>. All rights reserved. (Last updated: 2021-12-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>