Skip to content
This repository was archived by the owner on Feb 3, 2019. It is now read-only.

Commit a50d6e3

Browse files
author
deissh
committed
Merge remote-tracking branch 'origin/golang' into golang
2 parents 409db73 + 060f6f9 commit a50d6e3

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,72 @@
11
# Simple Lambda Service
22

3+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c4d781bc8ecd430b95385f8a4bc0fec5)](https://www.codacy.com/app/Deissh/lambda?utm_source=github.com&utm_medium=referral&utm_content=deissh/lambda&utm_campaign=Badge_Grade)
4+
35
[![GitHub issues](https://img.shields.io/github/issues/deissh/lambda.svg)](https://github.com/deissh/lambda/issues)
46
[![GitHub stars](https://img.shields.io/github/stars/deissh/lambda.svg)](https://github.com/deissh/lambda/stargazers)
57
[![Twitter](https://img.shields.io/twitter/url/https/github.com/deissh/lambda.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fdeissh%2Flambda)
68

79
![img](https://blog.alexellis.io/content/images/2017/08/clip-1.png)
810

911
Lambda is a framework for building Serverless functions with Docker which has first-class support for metrics. Any process can be packaged as a function enabling you to consume a range of web events without repetitive boiler-plate coding.
12+
13+
## API
14+
15+
Your function available on custom port. For example `2233` is function port.
16+
17+
### Simple ping function
18+
19+
```bash
20+
curl -X GET \
21+
http://localhost:2233/_/ping
22+
```
23+
24+
### Triger function
25+
26+
```bash
27+
curl -X GET \
28+
http://localhost:2233
29+
```
30+
31+
### Create new function
32+
33+
```bash
34+
curl -X POST \
35+
http://localhost:3000/v1/create \
36+
-H 'Content-Type: application/json' \
37+
-d '{
38+
"name": "example",
39+
"uuid": "dasdxqxeqsd132eqw",
40+
"runtime": {
41+
"executor": "/bin/cat",
42+
"cmd": ""
43+
},
44+
"repository": {
45+
"image": "deissh/lambda-runner:latest"
46+
},
47+
"service": {
48+
"port": "2233",
49+
"host": "0.0.0.0"
50+
}
51+
}'
52+
```
53+
54+
### Inspect function
55+
56+
`/v1/stats/:uuid`
57+
58+
```bash
59+
curl -X GET \
60+
http://localhost:3000/v1/dasdxqxeqsd132eqw
61+
```
62+
63+
### Delete function
64+
65+
`/v1/:uuid`
66+
67+
You need change uuid befour use.
68+
69+
```bash
70+
curl -X DELETE \
71+
http://localhost:3000/v1/dasdxqxeqsd132eqw
72+
```

0 commit comments

Comments
 (0)