MCPcopy Create free account
hub / github.com/actiontech/dtle / GetNodeInfo

Function GetNodeInfo

api/handler/v2/node.go:92–99  ·  view source on GitHub ↗
(nodeId string)

Source from the content-addressed store, hash-verified

90}
91
92func GetNodeInfo(nodeId string) (nomadApi.Node, error) {
93 url := handler.BuildUrl(fmt.Sprintf("/v1/node/%s", nodeId))
94 nomadNode := nomadApi.Node{}
95 if err := handler.InvokeApiWithKvData(http.MethodGet, url, nil, &nomadNode); nil != err {
96 return nomadNode, err
97 }
98 return nomadNode, nil
99}
100
101func FindNodeList() ([]nomadApi.NodeListStub, error) {
102 nodesUrl := handler.BuildUrl("/v1/nodes")

Callers 1

buildNomadTaskGroupItemFunction · 0.85

Calls 2

BuildUrlFunction · 0.92
InvokeApiWithKvDataFunction · 0.92

Tested by

no test coverage detected