code: func NewTranslateFile(opts ...TranslateFileOption) *TranslateFile {
  	var defaultMapSize64 int64 = 10 * (1 << 30)
  	var defaultMapSize int
  
  	if ^uint(0)>>32 > 0 {
  		// 10GB default map size
  		defaultMapSize = int(defaultMapSize64)
  	} else {
  		// Use 2GB default map size on 32-bit systems
  		defaultMapSize = (1 << 31) - 1
  	}
  	f := &TranslateFile{
  		writeNotify: make(chan struct{}),
  		closing:     make(chan struct{}),
  		cols:        make(map[string]*index),
  		rows:        make(map[fieldKey]*index),
  
  		mapSize: defaultMapSize,
  
  		logger: logger.NopLogger,
  
  		replicationClosing: make(chan struct{}),
  		primaryStoreEvents: make(chan primaryStoreEvent),
  
  		replicationRetryInterval: defaultReplicationRetryInterval,
  	}
  
  	for _, opt := range opts {
  		err := opt(f)
  		if err != nil {
  			// TODO (2.0): Change func signature to return error
  			panic(errors.Wrap(err, "applying option"))
  		}
  	}
  
  	return f
  }
docs: // NewTranslateFile returns a new instance of TranslateFile.