From 574d58296476ca91a5b6820515938b1e467e9743 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Mon, 6 May 2024 16:15:22 +0800 Subject: [PATCH] fix: broken links for nodeapi --- nodeapi/README.md | 2 +- nodeapi/nodeapi.go | 12 ++++++------ nodeapi/nodeapi_example_test.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nodeapi/README.md b/nodeapi/README.md index 448e8f32..f9082e81 100644 --- a/nodeapi/README.md +++ b/nodeapi/README.md @@ -1,5 +1,5 @@ # Node Api -This package implements the eigenlayer avs node spec [node-api](https://eigen.nethermind.io/docs/category/avs-node-api). +This package implements the eigenlayer avs node spec [node-api](https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/). For an example of how to use this package, see [node-api-example](./nodeapi_example_test.go#L8) \ No newline at end of file diff --git a/nodeapi/nodeapi.go b/nodeapi/nodeapi.go index 4cf7990b..94cbb152 100644 --- a/nodeapi/nodeapi.go +++ b/nodeapi/nodeapi.go @@ -1,6 +1,6 @@ package nodeapi -// Implementation of https://eigen.nethermind.io/docs/spec/api/#api-versioning +// Implementation of https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/#api-versioning import ( "context" @@ -18,7 +18,7 @@ import ( const ( baseUrl = "/eigen" // Spec version is the version of the avs node spec that this node is implementing - // see https://eigen.nethermind.io/docs/spec/api/#api-versioning + // see https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/#api-versioning specSemVer = "v0.0.1" ) @@ -131,7 +131,7 @@ func (api *NodeApi) specVersionHandler(w http.ResponseWriter, r *http.Request) { } } -// https://eigen.nethermind.io/docs/metrics/metrics-api#get-eigennodeversion +// https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/#get-eigennode func (api *NodeApi) nodeHandler(w http.ResponseWriter, r *http.Request) { response := map[string]string{ "node_name": api.avsNodeName, @@ -144,7 +144,7 @@ func (api *NodeApi) nodeHandler(w http.ResponseWriter, r *http.Request) { } } -// https://eigen.nethermind.io/docs/metrics/metrics-api#get-eigennodehealth +// https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/#get-eigennodehealth func (api *NodeApi) healthHandler(w http.ResponseWriter, r *http.Request) { switch api.health { case Healthy: @@ -163,7 +163,7 @@ func (api *NodeApi) healthHandler(w http.ResponseWriter, r *http.Request) { } } -// https://eigen.nethermind.io/docs/metrics/metrics-api#get-eigennodeservices +// https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/#get-eigennodeservices func (api *NodeApi) servicesHandler(w http.ResponseWriter, r *http.Request) { response := map[string][]nodeService{ "services": api.nodeServices, @@ -174,7 +174,7 @@ func (api *NodeApi) servicesHandler(w http.ResponseWriter, r *http.Request) { } } -// https://eigen.nethermind.io/docs/metrics/metrics-api#get-eigennodeservicesservice_idhealth +// https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/#get-eigennodeservicesservice_idhealth func (api *NodeApi) serviceHealthHandler(w http.ResponseWriter, r *http.Request) { suffix, found := strings.CutPrefix(r.URL.Path, "/eigen/node/services/") if !found { diff --git a/nodeapi/nodeapi_example_test.go b/nodeapi/nodeapi_example_test.go index 94939f4f..050ed69d 100644 --- a/nodeapi/nodeapi_example_test.go +++ b/nodeapi/nodeapi_example_test.go @@ -13,7 +13,7 @@ func ExampleNodeApi() { nodeApi := nodeapi.NewNodeApi("testAvs", "v0.0.1", "localhost:8080", logger) // register a service with the nodeApi. This could be a db, a cache, a queue, etc. - // see https://eigen.nethermind.io/docs/spec/api/#get-eigennodeservices + // see https://docs.eigenlayer.xyz/eigenlayer/avs-guides/spec/api/#get-eigennodeservices nodeApi.RegisterNewService("testServiceId", "testServiceName", "testServiceDescription", nodeapi.ServiceStatusInitializing) // this starts the nodeApi server in a goroutine, so no need to wrap it in a go func