code: func generatePathComponents(prefix, name string) ds.PropertySlice {
  	ps, ns := types.StreamName(prefix).Segments(), types.StreamName(name).Segments()
  
  	// Allocate our components array. For each component, there are two entries
  	// (forward and reverse), as well as one count entry per component type.
  	c := make(ds.PropertySlice, 0, (len(ps)+len(ns)+1)*2)
  
  	gen := func(b string, segs []string) {
  		// Generate count component (PC:4).
  		c = append(c, ds.MkProperty(fmt.Sprintf("%sC:%d", b, len(segs))))
  
  		// Generate forward and reverse components.
  		for i, s := range segs {
  			c = append(c,
  				// Forward (PF:0:foo).
  				ds.MkProperty(fmt.Sprintf("%sF:%d:%s", b, i, s)),
  				// Reverse (PR:3:foo)
  				ds.MkProperty(fmt.Sprintf("%sR:%d:%s", b, len(segs)-i-1, s)),
  			)
  		}
  	}
  	gen("P", ps)
  	gen("N", ns)
  	return c
  }
docs: // generatePathComponents generates the "_C" property path components for path
  // glob querying.
  //
  // See the comment on LogStream for more infromation.