Skip to content

Commit 11f1066

Browse files
committed
initial commit
0 parents  commit 11f1066

File tree

9 files changed

+133
-0
lines changed

9 files changed

+133
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*.cr]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/docs/
2+
/lib/
3+
/bin/
4+
/.shards/
5+
*.dwarf

DESIGN.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Design for FaaSO
2+
3+
## Introduction
4+
5+
This should explain the high-level plan. Of course once I start
6+
writing the thing it will change, because I am *agile* like that.
7+
8+
So, here it is:
9+
10+
## Function Builder
11+
12+
Take the function code, some ancillary files, and build a docker
13+
image using a template so that it can be executed.
14+
15+
Additionally:
16+
17+
* The image should be runnable with a standard `docker run` command
18+
* A test can be defined to check if the function is working
19+
20+
## Function Runner
21+
22+
Given a description of what functions should be made available at
23+
which endpoints, like
24+
25+
/sum -> sum
26+
/mul -> multiply
27+
28+
It should:
29+
30+
* Start those functions via docker, running in specific ports
31+
* Create a reverse proxy that routes the paths to the correct function
32+
* Start/reload/configure the proxy as needed
33+
* Periodically check the functions are still running
34+
35+
Intentionally: No HA yet, no multiple instances of functions, no
36+
up/downscaling, no multiple versions routed by header.
37+
38+
# Implementation Ideas
39+
40+
* caddy for proxy? It's simple, fast, API-configurable.
41+
* Local docker registry for images? See https://www.docker.com/blog/how-to-use-your-own-registry-2/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Roberto Alsina <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# faaso
2+
3+
TODO: Write a description here
4+
5+
## Installation
6+
7+
TODO: Write installation instructions here
8+
9+
## Usage
10+
11+
TODO: Write usage instructions here
12+
13+
## Development
14+
15+
TODO: Write development instructions here
16+
17+
## Contributing
18+
19+
1. Fork it (<https://github.com/your-github-user/faaso/fork>)
20+
2. Create your feature branch (`git checkout -b my-new-feature`)
21+
3. Commit your changes (`git commit -am 'Add some feature'`)
22+
4. Push to the branch (`git push origin my-new-feature`)
23+
5. Create a new Pull Request
24+
25+
## Contributors
26+
27+
- [Roberto Alsina](https://github.com/your-github-user) - creator and maintainer

shard.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: faaso
2+
version: 0.1.0
3+
4+
authors:
5+
- Roberto Alsina <[email protected]>
6+
7+
targets:
8+
faaso:
9+
main: src/faaso.cr
10+
11+
crystal: '>= 1.12.2'
12+
13+
license: MIT

spec/faaso_spec.cr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require "./spec_helper"
2+
3+
describe Faaso do
4+
# TODO: Write tests
5+
6+
it "works" do
7+
false.should eq(true)
8+
end
9+
end

spec/spec_helper.cr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require "spec"
2+
require "../src/faaso"

src/faaso.cr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# TODO: Write documentation for `Faaso`
2+
module Faaso
3+
VERSION = "0.1.0"
4+
5+
# TODO: Put your code here
6+
end

0 commit comments

Comments
 (0)