https://github.com/graphql-editor/azure-functions-golang-worker
https://github.com/graphql-editor/azure-functions-golang-worker
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/graphql-editor/azure-functions-golang-worker
- Owner: graphql-editor
- Created: 2020-02-25T13:16:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T12:21:13.000Z (over 6 years ago)
- Last Synced: 2025-01-01T21:46:33.679Z (over 1 year ago)
- Language: Go
- Size: 122 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
An attempt to implement golang worker for Azure functions host runner.
# Example
```golang
package main
import (
"context"
"fmt"
"github.com/graphql-editor/azure-functions-golang-worker/api"
)
// HTTPTrigger is an example httpTrigger
type HTTPTrigger struct {
Request *api.Request `azfunc:"httpTrigger"`
Response api.Response `azfunc:"res"`
}
// Run implements function behaviour
func (h *HTTPTrigger) Run(ctx context.Context, logger api.Logger) {
logger.Info(fmt.Sprintf("called with %v", h.Request))
h.Response.Body = []byte("ok")
}
// Function exports function entry point
var Function HTTPTrigger
```
# Getting started
Check out example
# Disclaimer
This is not an official Azure Project and as such is not supported by Microsoft.