generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use plugin.Start for python language plugin (#3193)
- Loading branch information
1 parent
78cc2ce
commit dee85c5
Showing
4 changed files
with
26 additions
and
61 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 was deleted.
Oops, something went wrong.
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,23 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/language/languagepbconnect" | ||
"github.com/TBD54566975/ftl/common/plugin" | ||
pythonplugin "github.com/TBD54566975/ftl/python-runtime/python-plugin" | ||
) | ||
|
||
func main() { | ||
plugin.Start( | ||
context.Background(), | ||
"ftl-language-python", | ||
createService, | ||
languagepbconnect.LanguageServiceName, | ||
languagepbconnect.NewLanguageServiceHandler, | ||
) | ||
} | ||
|
||
func createService(ctx context.Context, config any) (context.Context, *pythonplugin.Service, error) { | ||
return ctx, pythonplugin.New(), nil | ||
} |
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