code: func (a *Agent) loadMetadata(conf *config.RuntimeConfig) error {
  	meta := map[string]string{}
  	for k, v := range conf.NodeMeta {
  		meta[k] = v
  	}
  	meta[structs.MetaSegmentKey] = conf.SegmentName
  	return a.State.LoadMetadata(meta)
  }
docs: // loadMetadata loads node metadata fields from the agent config and
  // updates them on the local agent.