This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add RunnerService + Go implementation (#30)
This is not wired up to the Backplane yet.
- Loading branch information
1 parent
bad5468
commit bdde132
Showing
28 changed files
with
1,509 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.go-1.20.2.pkg | ||
.go-1.20.4.pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.go-1.20.2.pkg | ||
.go-1.20.4.pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/alecthomas/kong" | ||
|
||
_ "github.com/TBD54566975/ftl/common/automaxprocs" // Set GOMAXPROCS to match Linux container CPU quota. | ||
"github.com/TBD54566975/ftl/common/log" | ||
runner "github.com/TBD54566975/ftl/runner-go" | ||
) | ||
|
||
var config struct { | ||
LogConfig log.Config `prefix:"log-" embed:""` | ||
RunnerConfig runner.Config `embed:""` | ||
} | ||
|
||
func main() { | ||
cacheDir, err := os.UserCacheDir() | ||
if err != nil { | ||
panic(err) | ||
} | ||
kctx := kong.Parse(&config, kong.Description(` | ||
FTL - Towards a 𝝺-calculus for large-scale systems | ||
The Runner is the component of FTL that coordinates with the Backplane to spawn | ||
and route to user code. | ||
`), kong.Vars{ | ||
"deploymentdir": filepath.Join(cacheDir, "ftl-runner-go", "deployments"), | ||
}) | ||
logger := log.Configure(os.Stderr, config.LogConfig) | ||
ctx := log.ContextWithLogger(context.Background(), logger) | ||
err = runner.Start(ctx, config.RunnerConfig) | ||
kctx.FatalIfErrorf(err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.