// Finds and returns meta data associated
// with `key`.
550091
func (t *Trie) Find(key string) (*Node, bool) {
	node := findNode(t.Root(), []rune(key))
	if node == nil {
		return nil, false
	}

	node, ok := node.Children()[nul]
	if !ok || !node.term {
		return nil, false
	}

	return node, true
}
419990
func (s *ContextStoreWithDefault) GetMetadata(name string) (store.Metadata, error) {
	if name == DefaultContextName {
		defaultContext, err := s.Resolver()
		if err != nil {
			return store.Metadata{}, err
		}
		return defaultContext.Meta, nil
	}
	return s.Store.GetMetadata(name)
}
485993
func (a *ChildrenAggregation) Meta(metaData map[string]interface{}) *ChildrenAggregation {
	a.meta = metaData
	return a
}
387345
func mustGetMetadata(key string) []byte {
	b, err := getMetadata(key)
	if err != nil {
		log.Fatalf("Metadata fetch failed: %v", err)
	}
	return b
}
1283965
func (a *HistogramAggregation) Meta(metaData map[string]interface{}) *HistogramAggregation {
	a.meta = metaData
	return a
}
582182
func (a *WeightedAvgAggregation) Meta(metaData map[string]interface{}) *WeightedAvgAggregation {
	a.meta = metaData
	return a
}
1079284
func (a *DerivativeAggregation) Meta(metaData map[string]interface{}) *DerivativeAggregation {
	a.meta = metaData
	return a
}
777143
func (a *StatsAggregation) Meta(metaData map[string]interface{}) *StatsAggregation {
	a.meta = metaData
	return a
}
396269
func (b *RouteBuilder) Metadata(key string, value interface{}) *RouteBuilder {
	if b.metadata == nil {
		b.metadata = map[string]interface{}{}
	}
	b.metadata[key] = value
	return b
}
843556
func (c *Client) Meta(uri *Hyperlink) (info APIInfo, result *Result) {
	url, err := uri.Expand(nil)
	if err != nil {
		return info, &Result{Err: err}
	}
	var meta meta
	result = c.get(url, &meta)
	if !result.HasError() {
		info = meta.transform()
	}
	return
}
1176054
func (p *PercentilesBucketAggregation) Meta(metaData map[string]interface{}) *PercentilesBucketAggregation {
	p.meta = metaData
	return p
}
38856
func (a *MissingAggregation) Meta(metaData map[string]interface{}) *MissingAggregation {
	a.meta = metaData
	return a
}
833475
func (a *DiversifiedSamplerAggregation) Meta(metaData map[string]interface{}) *DiversifiedSamplerAggregation {
	a.meta = metaData
	return a
}
480467
func (c *InstancesClient) GetMetadata(ctx context.Context, input *GetMetadataInput) (string, error) {
	if input.Key == "" {
		return "", fmt.Errorf("Missing metadata Key from input: %s", input.Key)
	}

	fullPath := path.Join("/", c.client.AccountName, "machines", input.ID, "metadata", input.Key)
	reqInputs := client.RequestInput{
		Method: http.MethodGet,
		Path:   fullPath,
	}
	response, err := c.client.ExecuteRequestRaw(ctx, reqInputs)
	if err != nil {
		return "", pkgerrors.Wrap(err, "unable to get machine metadata")
	}
	if response != nil {
		defer response.Body.Close()
	}
	if response.StatusCode == http.StatusNotFound || response.StatusCode == http.StatusGone {
		return "", &errors.APIError{
			StatusCode: response.StatusCode,
			Code:       "ResourceNotFound",
		}
	}

	body, err := ioutil.ReadAll(response.Body)
	if err != nil {
		return "", pkgerrors.Wrap(err, "unable to decode get machine metadata response")
	}

	return fmt.Sprintf("%s", body), nil
}
816303
func (d *Driver) Metadata(id string) (map[string]string, error) {
	panicIfUsedByLcow()
	m := make(map[string]string)
	m["dir"] = d.dir(id)
	return m, nil
}
1345533
func (a *ScriptedMetricAggregation) Meta(metaData map[string]interface{}) *ScriptedMetricAggregation {
	a.meta = metaData
	return a
}
731601
func (a *MatrixStatsAggregation) Meta(metaData map[string]interface{}) *MatrixStatsAggregation {
	a.meta = metaData
	return a
}