Update checklist-rpc-endpoint.md (#17698)
* Update checklist-rpc-endpoint.md * Update checklist-rpc-endpoint.md * Update contributing/checklist-rpc-endpoint.md Co-authored-by: Tim Gross <tgross@hashicorp.com> --------- Co-authored-by: Tim Gross <tgross@hashicorp.com>
This commit is contained in:
parent
32af971bcb
commit
28b66d2400
|
@ -6,13 +6,16 @@ Prefer adding a new message to changing any existing RPC messages.
|
||||||
|
|
||||||
* [ ] `Request` struct and `*RequestType` constant in
|
* [ ] `Request` struct and `*RequestType` constant in
|
||||||
`nomad/structs/structs.go`. Append the constant, old constant
|
`nomad/structs/structs.go`. Append the constant, old constant
|
||||||
values must remain unchanged
|
values must remain unchanged. Just add the request type to this file, all other resource definitions
|
||||||
|
must be on their own separate file.
|
||||||
|
|
||||||
* [ ] In `nomad/fsm.go`, add a dispatch case to the switch statement in `(n *nomadFSM) Apply`
|
* [ ] In `nomad/fsm.go`, add a dispatch case to the switch statement in `(n *nomadFSM) Apply`
|
||||||
* `*nomadFSM` method to decode the request and call the state method
|
* `*nomadFSM` method to decode the request and call the state method
|
||||||
|
|
||||||
* [ ] State method for modifying objects in a `Txn` in `nomad/state/state_store.go`
|
* [ ] State method for modifying objects in a `Txn` in the `state` package, located in
|
||||||
* `nomad/state/state_store_test.go`
|
`nomad/state/`. Every new resource should have its own file and test file, named using the convention
|
||||||
|
`nomad/state/state_store_[resource].go` and `nomad/state/state_store_[resource]_test.go`
|
||||||
|
|
||||||
|
|
||||||
* [ ] Handler for the request in `nomad/foo_endpoint.go`
|
* [ ] Handler for the request in `nomad/foo_endpoint.go`
|
||||||
* RPCs are resolved by matching the method name for bound structs
|
* RPCs are resolved by matching the method name for bound structs
|
||||||
|
|
Loading…
Reference in New Issue