@@ -102,7 +102,7 @@ project, so please double-check where the code lives before filing InfraKit issu
102
102
Have a Plugin you'd like to share? Submit a Pull Request to add yourself to the list!
103
103
104
104
### Creating a plugin
105
- A plugin must be an HTTP server that implements one of the plugin [ APIs] ( #apis ) , lisetning on a Unix socket. While
105
+ A plugin must be an HTTP server that implements one of the plugin [ APIs] ( #apis ) , listening on a Unix socket. While
106
106
a plugin can be written in any programming language, [ utilities] ( pkg/rpc ) are available as libraries to simplify Plugin
107
107
development in Go. Our [ reference implementations] ( #reference-implementations ) should provide a good starting point
108
108
for building a new plugin using these utilities.
@@ -112,15 +112,15 @@ _InfraKit_ plugins are exposed via HTTP, using [JSON-RPC 2.0](http://www.jsonrpc
112
112
113
113
API requests can be made manually with ` curl ` . For example, the following command will list all groups:
114
114
``` console
115
- $ curl -X POST --unix-socket ~ /.infrakit/plugins/group http:/rpc \
115
+ $ curl -X POST --unix-socket ~ /.infrakit/plugins/group http:// rpc \
116
116
-H 'Content-Type: application/json' \
117
117
-d '{"jsonrpc":"2.0","method":"Group.InspectGroups","params":{},"id":1}'
118
118
{"jsonrpc":"2.0","result":{"Groups":null},"id":1}
119
119
```
120
120
121
121
API errors are surfaced with the ` error ` response field:
122
122
``` console
123
- $ curl -X POST --unix-socket ~ /.infrakit/plugins/group http:/rpc \
123
+ $ curl -X POST --unix-socket ~ /.infrakit/plugins/group http:// rpc \
124
124
-H 'Content-Type: application/json' \
125
125
-d '{"jsonrpc":"2.0","method":"Group.CommitGroup","params":{},"id":1}'
126
126
{"jsonrpc":"2.0","error":{"code":-32000,"message":"Group ID must not be blank","data":null},"id":1}
@@ -141,7 +141,7 @@ Plugins are required to identify the name and version of plugin APIs they implem
141
141
like the following:
142
142
143
143
``` console
144
- $ curl -X POST --unix-socket ~ /.infrakit/plugins/group http:/rpc \
144
+ $ curl -X POST --unix-socket ~ /.infrakit/plugins/group http:// rpc \
145
145
-H 'Content-Type: application/json' \
146
146
-d '{"jsonrpc":"2.0","method":"Plugin.Implements","params":{},"id":1}'
147
147
{"jsonrpc":"2.0","result":{"Interfaces":[{"Name":"Group","Version":"0.1.0"}]},"id":1}
0 commit comments