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:
Juana De La Cuesta 2023-06-27 10:52:38 +02:00 committed by GitHub
parent 32af971bcb
commit 28b66d2400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -6,13 +6,16 @@ Prefer adding a new message to changing any existing RPC messages.
* [ ] `Request` struct and `*RequestType` constant in
`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`
* `*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`
* `nomad/state/state_store_test.go`
* [ ] State method for modifying objects in a `Txn` in the `state` package, located in
`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`
* RPCs are resolved by matching the method name for bound structs