{"id":16465602,"url":"https://github.com/peterfox/roadrunner-plugin-demo","last_synced_at":"2025-10-17T15:44:44.320Z","repository":{"id":57623261,"uuid":"398046702","full_name":"peterfox/roadrunner-plugin-demo","owner":"peterfox","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-19T19:55:14.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T13:51:27.443Z","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/peterfox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null},"funding":{"github":"vendor_name"}},"created_at":"2021-08-19T19:00:43.000Z","updated_at":"2021-08-19T19:20:37.000Z","dependencies_parsed_at":"2022-08-27T00:01:19.777Z","dependency_job_id":null,"html_url":"https://github.com/peterfox/roadrunner-plugin-demo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"peterfox/roadrunner-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfox%2Froadrunner-plugin-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfox%2Froadrunner-plugin-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfox%2Froadrunner-plugin-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfox%2Froadrunner-plugin-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterfox","download_url":"https://codeload.github.com/peterfox/roadrunner-plugin-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241026495,"owners_count":19896644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-11T11:34:35.474Z","updated_at":"2025-10-17T15:44:39.268Z","avatar_url":"https://github.com/peterfox.png","language":"Go","funding_links":["https://github.com/sponsors/vendor_name"],"categories":[],"sub_categories":[],"readme":"# RoadRunner Plugin Template\n\n\u003cp align=\"center\"\u003e\n \u003ca href=\"https://github.com/peterfox/roadrunner-plugin-demo/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/peterfox/roadrunner-plugin-demo.svg?maxAge=30\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://pkg.go.dev/github.com/peterfox/roadrunner-plugin-demo\"\u003e\u003cimg src=\"https://godoc.org/github.com/peterfox/roadrunner-plugin-demo?status.svg\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/peterfox/roadrunner-plugin-template/actions\"\u003e\u003cimg src=\"https://github.com/peterfox/roadrunner-plugin-demo/workflows/tests/badge.svg\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://goreportcard.com/report/github.com/peterfox/roadrunner-plugin-demo\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/peterfox/roadrunner-plugin-demo\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://lgtm.com/projects/g/peterfox/roadrunner-plugin-demo/alerts/\"\u003e\u003cimg alt=\"Total alerts\" src=\"https://img.shields.io/lgtm/alerts/g/peterfox/roadrunner-plugin-demo.svg?logo=lgtm\u0026logoWidth=18\"/\u003e\u003c/a\u003e\n    \u003cimg alt=\"All releases\" src=\"https://img.shields.io/github/downloads/peterfox/roadrunner-plugin-demo/total\"\u003e\n\u003c/p\u003e\n\n## Installation\n\nTo use this plugin with RoadRunner you will need to fork or clone your\nown copy of the [RoadRunner binary](https://github.com/spiral/roadrunner-binary).\n\nYou can import the plugin via go modules:\n\n```sh\ngo get github.com/peterfox/roadrunner-plugin-demo\n```\n\nFrom there you can edit the [plugins.go](https://github.com/spiral/roadrunner-binary/blob/stable/internal/container/plugins.go) file to\nimport the plugin.\n\n```go\npackage container\n\nimport (\n    // ...\n    demoPlugin \"github.com/peterfox/roadrunner-plugin-demo\"\n    // ...\n)\n\n// Plugins returns active plugins for the endure container. Feel free to add or remove any plugins.\nfunc Plugins() []interface{} {\n\treturn []interface{}{\n        // ...\n        \u0026demoPlugin.Plugin{},\n        // ...\n    }\n}\n\n```\n\nBy importing this plugin and registering it the plugin will be compiled into the final binary.\n\nThe plugin will require that the _.rr.yaml_ config has the key `plugin` for the plugin won't initialise with roadrunner.\n\n```yaml\nplugin:\n  value: foobar\n```\n\n## Usage\n\nTo make use of this plugin via PHP you must install the [Spiral Goridge](https://github.com/spiral/goridge-php) library.\n\nYou can use the following code as an example in php:\n\n```php\n\u003c?php\n\nuse Spiral\\Goridge\\RPC\\RPC;\nuse Spiral\\RoadRunner\\Environment;\n\n$rpc = RPC::create(Environment::fromGlobals()-\u003egetRPCAddress());\n\n// returns ['message' =\u003e 'test']\n$output = $rpc-\u003ecall('plugin.Message', ['message' =\u003e 'test']);\n```\n\n## Testing\n\nYou may download the project and test the plugin using the following command.\n\n```bash\ngo test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Peter Fox](https://github.com/peterfox)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfox%2Froadrunner-plugin-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterfox%2Froadrunner-plugin-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfox%2Froadrunner-plugin-demo/lists"}