{"id":15345447,"url":"https://github.com/jthomas/openwhisk_go_action","last_synced_at":"2026-04-15T08:32:41.914Z","repository":{"id":140706155,"uuid":"61377013","full_name":"jthomas/openwhisk_go_action","owner":"jthomas","description":"Running Go language Actions on OpenWhisk","archived":false,"fork":false,"pushed_at":"2016-06-21T14:35:06.000Z","size":662,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T11:06:18.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-17T13:50:38.000Z","updated_at":"2017-12-22T05:11:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc30aa7a-8a82-4724-8c08-eda674da798a","html_url":"https://github.com/jthomas/openwhisk_go_action","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":"0.41666666666666663","last_synced_commit":"3a5b0eae05f5fc1008926f34d58d3c19408a04cd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jthomas/openwhisk_go_action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fopenwhisk_go_action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fopenwhisk_go_action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fopenwhisk_go_action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fopenwhisk_go_action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jthomas","download_url":"https://codeload.github.com/jthomas/openwhisk_go_action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fopenwhisk_go_action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31833828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T07:17:56.427Z","status":"ssl_error","status_checked_at":"2026-04-15T07:17:30.007Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T11:13:25.422Z","updated_at":"2026-04-15T08:32:41.898Z","avatar_url":"https://github.com/jthomas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenWhisk Action using Go\n\nThis project highlights two methods for running Go language binaries as OpenWhisk Actions, using the OpenWhisk Docker SDK or a custom Go handler via Docker.\n\nThe OpenWhisk [Docker SDK](https://github.com/openwhisk/openwhisk/blob/master/docs/reference.md#docker-actions) uses a Node.js application to handle the JSON request from the platform and spawns a process to execute the Go binary. Invocation parameters are passed as a JSON string as a command-line argument to the binary. The binary must write the JSON string response to _stdout_, the handler will return this to the platform.\n\nUsing the custom Go handler, the user uses an [external library](https://github.com/jthomas/ow) that implements a callback to register your Action function. The library implements a simple web service that handles processing the invocations from the platform, executing the registered Action callback for each request. This compiled binary is built and runs in a Docker container.\n\nusage\n--\n\n- Modify the sample _action.go_ file in the [docker_sdk](https://github.com/jthomas/openwhisk_go_action/tree/master/docker_sdk) or [go_handler](https://github.com/jthomas/openwhisk_go_action/tree/master/go_handler) directory with the implementation code.\n\n- Install Go packages (_Go handler sample only_)\n```\ngo get github.com/jthomas/ow\n```\n\n- Cross-compile Go binary for platform architecture.\n```\nexport GOARCH=386\nexport GOOS=linux\ngo build -o action\n```\n\n- Build Docker image for Action and push to Dockerhub.\n\n```\ndocker build -t dockerhub_username/some_image_name .\ndocker push dockerhub_username/some_image_name\n```\n\n- Create OpenWhisk Action from public image.\n\n```\nwsk action create --docker go_action dockerhub_username/some_image_name\n```\n\n- Invoke Go Action.\n\n```\nwsk action invoke --blocking --result go_action --param payload \"Hello World\"\n{\n    \"reversed\": \"dlroW olleH\"\n}\n```\n\ndetails (docker sdk)\n-- \n\nThis example builds a Docker image, copying in the Go binary to be executed, using the following [base image](https://hub.docker.com/r/jamesthomas/openwhisk_docker_action/). The base image uses a Node.js server to handle managing the execution requests from the OpenWhisk platform. When an Action is invoked, the binary file is executed. \n\nThe path for the binary defaults to _/blackbox/action_, this can be overridden using a custom _ENV_ command for the _ACTION_ environment variable.\n\nThe JSON string for the invocation parameters is passed as the single command-line argument to the binary. Any data written to stdout will be interpreted as JSON and passed as the response value.\n\n\ndetails (go handler)\n-- \n\nThis example uses an external Go library to provide an interface for registering functions as Actions. The library implements a simple web service that handles processing the invocations from the platform, executing the registered Action callback for each request. \n\n```go\nopenwhisk.RegisterAction(func(value json.RawMessage) (interface{}, error) {\n   ...\t\n}\n```\n\nThis compiled binary is executed in a custom Docker container.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomas%2Fopenwhisk_go_action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjthomas%2Fopenwhisk_go_action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomas%2Fopenwhisk_go_action/lists"}