code: func (l *buildListener) StreamRegistrationCallback(desc *logpb.LogStreamDescriptor) bundler.StreamChunkCallback {
  	if desc.Name == l.buildStreamName {
  		switch {
  		case desc.ContentType != protoutil.BuildMediaType:
  			l.report(errors.Reason("stream %q has content type %q, expected %q", desc.Name, desc.ContentType, protoutil.BuildMediaType).Err())
  		case desc.StreamType != logpb.StreamType_DATAGRAM:
  			l.report(errors.Reason("stream %q has type %q, expected %q", desc.Name, desc.StreamType, logpb.StreamType_DATAGRAM).Err())
  		default:
  			return buffered_callback.GetWrappedDatagramCallback(l.onBuildChunk)
  		}
  	}
  
  	// TODO(nodir): add support for sub-builds.
  
  	return nil
  }
docs: // StreamRegistrationCallback can be used as logdogServer.StreamRegistrationCallback.