code: func (c *cache) RegisterStream(ctx context.Context, st *LogStreamState, desc []byte) (*LogStreamState, error) {
  	entry, created := c.getCacheEntry(ctx, cacheEntryKey{
  		project: st.Project,
  		path:    st.Path,
  	})
  	tsCache.Add(ctx, 1, !created)
  
  	st, err := entry.registerStream(ctx, c.Coordinator, *st, desc)
  	if err != nil {
  		log.WithError(err).Errorf(ctx, "Error retrieving stream state.")
  		return nil, err
  	}
  
  	return st, nil
  }
docs: // RegisterStream invokes the wrapped Coordinator's RegisterStream method and
  // caches the result. It uses a Promise to cause all simultaneous identical
  // RegisterStream requests to block on a single RPC.