openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [incubator-openwhisk-website] branch asf-site updated: Automatic Site Publish by Jenkins
Date Wed, 07 Nov 2018 21:34:46 GMT
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 1ec016f  Automatic Site Publish by Jenkins
1ec016f is described below

commit 1ec016fe501d1ba97d86bcf28c014c428d483e31
Author: jenkins <users@infra.apache.org>
AuthorDate: Wed Nov 7 21:34:44 2018 +0000

    Automatic Site Publish by Jenkins
---
 documentation.html | 72 ++++++++++++------------------------------------------
 feed.xml           |  2 +-
 2 files changed, 17 insertions(+), 57 deletions(-)

diff --git a/documentation.html b/documentation.html
index 772303d..5435553 100644
--- a/documentation.html
+++ b/documentation.html
@@ -1383,59 +1383,30 @@ function addListenersToSections()
 12
 13
 14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25</pre></td><td class="code"><pre><span class="k">package</span><span
class="x"> </span><span class="n">main</span><span class="x">
-
-</span><span class="k">import</span><span class="x"> </span><span
class="s">"encoding/json"</span><span class="x">
-</span><span class="k">import</span><span class="x"> </span><span
class="s">"fmt"</span><span class="x">
-</span><span class="k">import</span><span class="x"> </span><span
class="s">"os"</span><span class="x">
-
-</span><span class="k">func</span><span class="x"> </span><span
class="n">main</span><span class="p">()</span><span class="x">
</span><span class="p">{</span><span class="x">
-    </span><span class="c">//program receives one argument: the JSON object as
a string</span><span class="x">
-    </span><span class="n">arg</span><span class="x"> </span><span
class="o">:=</span><span class="x"> </span><span class="n">os</span><span
class="o">.</span><span class="n">Args</span><span class="p">[</span><span
class="m">1</span><span class="p">]</span><span class="x">
+15</pre></td><td class="code"><pre><span class="k">package</span><span
class="x"> </span><span class="n">main</span><span class="x">
 
-    </span><span class="c">// unmarshal the string to a JSON object</span><span
class="x">
-    </span><span class="k">var</span><span class="x"> </span><span
class="n">obj</span><span class="x"> </span><span class="k">map</span><span
class="p">[</span><span class="kt">string</span><span class="p">]</span><span
class="k">interface</span><span class="p">{}</span><span class="x">
-    </span><span class="n">json</span><span class="o">.</span><span
class="n">Unmarshal</span><span class="p">([]</span><span class="kt">byte</span><span
class="p">(</span><span class="n">arg</span><span class="p">),</span><span
class="x"> </span><span class="o">&amp;</span><span class="n">obj</span><span
class="p">)</span><span class="x">
-
-    </span><span class="c">// can optionally log to stdout (or stderr)</span><span
class="x">
-    </span><span class="n">fmt</span><span class="o">.</span><span
class="n">Println</span><span class="p">(</span><span class="s">"hello
Go action"</span><span class="p">)</span><span class="x">
-
-    </span><span class="n">name</span><span class="p">,</span><span
class="x"> </span><span class="n">ok</span><span class="x"> </span><span
class="o">:=</span><span class="x"> </span><span class="n">obj</span><span
class="p">[</span><span class="s">"name"</span><span class="p">]</span><span
class="o">.</span><span class="p">(</span><span class="kt">string</span><span
class="p">)</span><span class="x">
-    </span><span class="k">if</span><span class="x"> </span><span
class="o">!</span><span class="n">ok</span><span class="x"> </span><span
class="p">{</span><span class="x"> </span><span class="n">name</span><span
class="x"> </span><span class="o">=</span><span class="x"> </span><span
class="s">"Stranger"</span><span class="x"> </span><span class="p">}</span><span
class="x">
+</span><span class="k">import</span><span class="x"> </span><span
class="s">"fmt"</span><span class="x">
 
-    </span><span class="c">// last line of stdout is the result JSON object as
a string</span><span class="x">
-    </span><span class="n">msg</span><span class="x"> </span><span
class="o">:=</span><span class="x"> </span><span class="k">map</span><span
class="p">[</span><span class="kt">string</span><span class="p">]</span><span
class="kt">string</span><span class="p">{</span><span class="s">"msg"</span><span
class="o">:</span><span class="x"> </span><span class="p">(</span><span
class="s">"Hello, "</span><span class="x"> </span><span class="o">+</span><span
class="x"> </span><span class="n">name [...]
-    </span><span class="n">res</span><span class="p">,</span><span
class="x"> </span><span class="n">_</span><span class="x"> </span><span
class="o">:=</span><span class="x"> </span><span class="n">json</span><span
class="o">.</span><span class="n">Marshal</span><span class="p">(</span><span
class="n">msg</span><span class="p">)</span><span class="x">
-    </span><span class="n">fmt</span><span class="o">.</span><span
class="n">Println</span><span class="p">(</span><span class="kt">string</span><span
class="p">(</span><span class="n">res</span><span class="p">))</span><span
class="x">
+</span><span class="c">// Main function for the action</span><span class="x">
+</span><span class="k">func</span><span class="x"> </span><span
class="n">Main</span><span class="p">(</span><span class="n">obj</span><span
class="x"> </span><span class="k">map</span><span class="p">[</span><span
class="kt">string</span><span class="p">]</span><span class="k">interface</span><span
class="p">{})</span><span class="x"> </span><span class="k">map</span><span
class="p">[</span><span class="kt">string</span><span class="p">]</span><span
class="k">interface</span><span class [...]
+	</span><span class="n">name</span><span class="p">,</span><span
class="x"> </span><span class="n">ok</span><span class="x"> </span><span
class="o">:=</span><span class="x"> </span><span class="n">obj</span><span
class="p">[</span><span class="s">"name"</span><span class="p">]</span><span
class="o">.</span><span class="p">(</span><span class="kt">string</span><span
class="p">)</span><span class="x">
+	</span><span class="k">if</span><span class="x"> </span><span
class="o">!</span><span class="n">ok</span><span class="x"> </span><span
class="p">{</span><span class="x">
+		</span><span class="n">name</span><span class="x"> </span><span
class="o">=</span><span class="x"> </span><span class="s">"stranger"</span><span
class="x">
+	</span><span class="p">}</span><span class="x">
+	</span><span class="n">fmt</span><span class="o">.</span><span
class="n">Printf</span><span class="p">(</span><span class="s">"name=%s</span><span
class="se">\n</span><span class="s">"</span><span class="p">,</span><span
class="x"> </span><span class="n">name</span><span class="p">)</span><span
class="x">
+	</span><span class="n">msg</span><span class="x"> </span><span
class="o">:=</span><span class="x"> </span><span class="nb">make</span><span
class="p">(</span><span class="k">map</span><span class="p">[</span><span
class="kt">string</span><span class="p">]</span><span class="k">interface</span><span
class="p">{})</span><span class="x">
+	</span><span class="n">msg</span><span class="p">[</span><span
class="s">"msg"</span><span class="p">]</span><span class="x">
</span><span class="o">=</span><span class="x"> </span><span
class="s">"Hello, "</span><span class="x"> </span><span class="o">+</span><span
class="x"> </span><span class="n">name</span><span class="x"> </span><span
class="o">+</span><span class="x"> </span><span class="s">"!"</span><span
class="x">
+	</span><span class="k">return</span><span class="x"> </span><span
class="n">msg</span><span class="x">
 </span><span class="p">}</span><span class="w">
 </span></pre></td></tr></tbody></table></code></pre></figure>
 
                         </div>
                     </li>
                     <li style="list-style-type: decimal">
-                        Create an executable called <i>exec</i> using <i>hello.go</i>:
-                        <div class="terminal">
-
-<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span
class="gp">$ </span><span class="nv">GOOS</span><span class="o">=</span>linux
<span class="nv">GOARCH</span><span class="o">=</span>amd64 go build
-o <span class="nb">exec</span>
-<span class="gp">$ </span>zip exec.zip <span class="nb">exec</span></code></pre></figure>
-
-                        </div>
-                    </li>
-                    <li style="list-style-type: decimal">
                         Create an action <i>helloGo</i>:
                         <div class="terminal">
 
-<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span
class="gp">$ </span>wsk action create helloGo --native exec.zip</code></pre></figure>
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span
class="gp">$ </span>wsk action create helloGo hello.go</code></pre></figure>
 
                         </div>
                     </li>
@@ -1463,15 +1434,6 @@ function addListenersToSections()
                         <ol>
                             <li>Create a directory called <i>actions</i>
with <i>hello.go</i> from step 1 <a href="#hello-go">above</a>.</li>
                             <li>
-                                Create an executable called <i>exec</i> using
<i>hello.go</i>:
-                                <div class="terminal">
-
-<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span
class="gp">$ </span><span class="nb">cd </span>actions/
-<span class="gp">$ </span><span class="nv">GOOS</span><span class="o">=</span>linux
<span class="nv">GOARCH</span><span class="o">=</span>amd64 go build
-o <span class="nb">exec</span></code></pre></figure>
-
-                                </div>
-                            </li>
-                            <li>
                                 Create <i>manifest.yaml</i> with the following
YAML content:
                                 <div class="terminal">
 
@@ -1479,13 +1441,11 @@ function addListenersToSections()
 2
 3
 4
-5
-6</pre></td><td class="code"><pre><span class="s">packages</span><span
class="pi">:</span>
+5</pre></td><td class="code"><pre><span class="s">packages</span><span
class="pi">:</span>
     <span class="s">default</span><span class="pi">:</span>
         <span class="s">actions</span><span class="pi">:</span>
             <span class="s">helloGo</span><span class="pi">:</span>
-                <span class="s">function</span><span class="pi">:</span>
<span class="s">actions/</span>
-                <span class="s">native</span><span class="pi">:</span>
<span class="s">true</span><span class="w">
+                <span class="s">function</span><span class="pi">:</span>
<span class="s">hello.go</span><span class="w">
 </span></pre></td></tr></tbody></table></code></pre></figure>
 
                                 </div>
@@ -1511,8 +1471,8 @@ function addListenersToSections()
                 <a class="indexable" id="go-additional-resources"></a>
                 <h5>Additional Resources</h5>
                 <ul>
-                    <li><a href="http://jamesthom.as/blog/2017/01/17/openwhisk-and-go/">Running
Go Binaries on OpenWhisk</a></li>
                     <li><a href="https://www.slideshare.net/MicheleSciabarr/openwhisk-go-runtime">OpenWhisk
Go Runtime</a></li>
+                    <li><a href="https://www.slideshare.net/MicheleSciabarr/openwhisk-goswiftbinaries-runtime">ActionLoop,
Go and Swift</a></li>                   
                 </ul>
             </div>
         </main>
diff --git a/feed.xml b/feed.xml
index 58a1c38..0be8bf7 100644
--- a/feed.xml
+++ b/feed.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"
><generator uri="https://jekyllrb.com/" version="3.3.0">Jekyll</generator><link
href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate"
type="text/html" /><updated>2018-11-07T21:03:56+00:00</updated><id>/feed.xml</id><title
type="html">Apache OpenWhisk is a serverless, open source cloud platform</title><subtitle>An
open source platform for serverless, event-driven code at any  [...]
+<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"
><generator uri="https://jekyllrb.com/" version="3.3.0">Jekyll</generator><link
href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate"
type="text/html" /><updated>2018-11-07T21:34:40+00:00</updated><id>/feed.xml</id><title
type="html">Apache OpenWhisk is a serverless, open source cloud platform</title><subtitle>An
open source platform for serverless, event-driven code at any  [...]
 </subtitle></feed>
\ No newline at end of file


Mime
View raw message