You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -28,14 +28,13 @@ In the terminal type the following:
28
28
29
29

30
30
>```sh
31
-
> fn init --runtime go --trigger http gofn
31
+
> fn init --runtime go gofn
32
32
>```
33
33
34
34
The output will be
35
35
36
36
```yaml
37
-
Creating functionat: /gofn
38
-
Runtime: go
37
+
Creating functionat: ./gofn
39
38
Function boilerplate generated.
40
39
func.yaml created.
41
40
```
@@ -61,7 +60,7 @@ Now get a list of the directory contents.
61
60
>```
62
61
63
62
```txt
64
-
Gopkg.toml func.go func.yaml
63
+
func.go func.yaml go.mod
65
64
```
66
65
67
66
The `func.go` file which contains your actual Go function is generated along
@@ -124,10 +123,6 @@ name: gofn
124
123
version: 0.0.1
125
124
runtime: go
126
125
entrypoint: ./func
127
-
triggers:
128
-
- name: gofn-trigger
129
-
type: http
130
-
source: /gofn-trigger
131
126
```
132
127
133
128
The generated `func.yaml` file contains metadata about your function and
@@ -140,10 +135,6 @@ declares a number of properties including:
140
135
in `--runtime`.
141
136
* entrypoint--the name of the executable to invoke when your function is called,
142
137
in this case `./func`
143
-
* triggers--identifies the automatically generated trigger name and source. For
144
-
example, this function would be executed from the URL
145
-
<http://localhost:8080/t/appname/gofn-trigger>. Where appname is the name of
146
-
the app chosen for your function when it is deployed.
147
138
148
139
There are other user specifiable properties but these will suffice for
149
140
this example. Note that the name of your function is taken from the containing
@@ -152,7 +143,7 @@ folder name. We'll see this come into play later on.
152
143
### Other Function Files
153
144
The `fn init` command generated one other file.
154
145
155
-
*`Gopkg.toml` -- the Go dep tool dependency management tool file which
146
+
*`go.mod` -- the Go modules file which
156
147
specifies all the dependencies for your function.
157
148
158
149
## Deploy Your First Function
@@ -163,16 +154,16 @@ running in the cloud, in your datacenter, or on your local machine like we're
163
154
doing here.
164
155
165
156
### Check your Context
166
-
Make sure your context is set to default and you are using a demo user. Use the `fn list context` command to check.
157
+
Make sure your context is set to default and you are using a demo user. Use the `fn list contexts` command to check.
167
158
168
159

169
160
>```sh
170
161
> fn list contexts
171
162
>```
172
163
173
164
```cs
174
-
CURRENT NAMEPROVIDERAPI URL REGISTRY
175
-
* default defaulthttp://localhost:8080fndemouser
165
+
CURRENT NAMEPROVIDERAPI URL REGISTRY
166
+
* default defaulthttp://localhost:8080fndemouser
176
167
```
177
168
178
169
If your context is not configured, please see [the context installation instructions](https://github.com/fnproject/tutorials/blob/master/install/README.md#configure-your-context) before proceeding. Your context determines where your function is deployed.
@@ -211,63 +202,45 @@ You should see output similar to:
All the steps to load the current language Docker image are displayed.
@@ -284,8 +257,7 @@ let's us know that the function is packaged in the image
284
257
285
258
Note that the containing folder name `gofn` was used as the name of the
286
259
generated Docker container and used as the name of the function that container
287
-
was bound to. By convention it is also used to create the trigger name
288
-
`gofn-trigger`.
260
+
was bound to.
289
261
290
262
Normally you deploy an application without the `--verbose` option. If you rerun the command a new image and version is created and loaded.
291
263
@@ -383,33 +355,107 @@ NAME ID
383
355
goapp 01D37WY2N2NG8G00GZJ0000001
384
356
```
385
357
386
-
We can also see the functions that are defined by an application. Since functions are exposed via triggers, the `fn list triggers <appname>` command is used. To list the functions included in "goapp" we can type:
358
+
The `fn list functions <app-name>` command lists all the functions associated with an app.
0 commit comments