Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 5d92e2e

Browse files
authored
Use kubeless runtime go1.14 with modules (#216)
1 parent dbce09a commit 5d92e2e

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
- docker
1010
env:
1111
global:
12-
- KUBELESS_VERSION: v1.0.6
12+
- KUBELESS_VERSION: v1.0.7
1313
- KUBELESS_KAFKA_VERSION: v1.0.2
1414
- MINIKUBE_VERSION: v0.25.2
1515
- REPO_DOMAIN: serverless

examples/post-go/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Simple Hello World function
22

3-
This function returns the given data capitalizing the first word.
3+
This function returns the given data.
44

55
```console
66
$ npm install

examples/post-go/go.mod

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module kubeless
2+
3+
go 1.14
4+
5+
require (
6+
github.com/kubeless/kubeless v1.0.7
7+
github.com/sirupsen/logrus v1.6.0
8+
)

examples/post-go/handler.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
package kubeless
22

33
import (
4-
"fmt"
5-
4+
"github.com/sirupsen/logrus"
65
"github.com/kubeless/kubeless/pkg/functions"
76
)
87

9-
// Handler sample function with data
8+
// Handler returns the given data.
109
func Handler(event functions.Event, context functions.Context) (string, error) {
11-
fmt.Println(event)
10+
logrus.Println(event)
1211
return event.Data, nil
1312
}

examples/post-go/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "Example function for serverless kubeless",
55
"dependencies": {
6-
"serverless-kubeless": "^0.7.0"
6+
"serverless-kubeless": "^0.10.1"
77
},
88
"devDependencies": {},
99
"scripts": {

examples/post-go/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: go-echo
22

33
provider:
44
name: kubeless
5-
runtime: go1.10
5+
runtime: go1.14
66

77
plugins:
88
- serverless-kubeless

0 commit comments

Comments
 (0)