// Node returns the nodeStatus that matchs nodeID in the etcd
Node returns the nodeStatus that matchs nodeID in the etcd
// Node returns the nodeStatus that matchs nodeID in the etcd
func (r *EtcdRegistry) Node(pctx context.Context, prefix, nodeID string) (*Status, error) {
	ctx, cancel := context.WithTimeout(pctx, r.reqTimeout)
	defer cancel()
	resp, err := r.client.List(ctx, r.prefixed(prefix, nodeID))
	if err != nil {
		return nil, errors.Trace(err)
	}
	status, err := nodeStatusFromEtcdNode(nodeID, resp)
	if err != nil {
		return nil, errors.Annotatef(err, "Invalid nodeID(%s)", nodeID)
	}
	return status, nil
}
func ( r * EtcdRegistry ) Node ( pctx context . Context , prefix , nodeID string ) ( * Status , error ) { ctx , cancel := context . WithTimeout ( pctx , r . reqTimeout ) defer cancel ( ) resp , err := r . client . List ( ctx , r . prefixed ( prefix , nodeID ) ) if err != nil { return nil , errors . Trace ( err ) } status , err := nodeStatusFromEtcdNode ( nodeID , resp ) if err != nil { return nil , errors . Annotatef ( err , " " , nodeID ) } return status , nil }
Node returns the nodeStatus that matchs nodeID in the etcd
Node returns the nodeStatus that matchs nodeID in the etcd