MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / parseClusterNodesPayload

Function parseClusterNodesPayload

internal/home/client.go:381–387  ·  view source on GitHub ↗
(raw []byte)

Source from the content-addressed store, hash-verified

379}
380
381func parseClusterNodesPayload(raw []byte) ([]clusterNode, error) {
382 var envelope clusterNodesEnvelope
383 if errUnmarshal := json.Unmarshal(raw, &envelope); errUnmarshal != nil {
384 return nil, errUnmarshal
385 }
386 return normalizeClusterNodes(envelope.Nodes), nil
387}
388
389func (c *Client) updateClusterNodesFromPayload(raw []byte) error {
390 if c == nil || !c.clusterDiscoveryEnabled() {

Callers 2

refreshClusterNodesMethod · 0.85

Calls 1

normalizeClusterNodesFunction · 0.85

Tested by

no test coverage detected