You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: command.rs
    path of file: ./repos/plane/plane/src/drone
    
    the code of the file until where you have to start completion: use crate::{
    drone::{docker::PlaneDockerConfig, DroneConfig},
    names::{DroneName, OrRandom},
    types::ClusterName,
    util::resolve_hostname,
};
use anyhow::Result;
use chrono::Duration;
use clap::Parser;
use std::{net::IpAddr, path::PathBuf};
use url::Url;

#[derive(Parser)]
pub struct DroneOpts {
    #[clap(long)]
    name: Option<DroneName>,

    #[clap(long)]
    controller_url: Url,

    #[clap(long)]
    cluster: ClusterName,

    /// IP address for this drone that proxies can connect to.
    #[clap(long, default_value = "127.0.0.1")]
    ip: String,

    /// Path to the database file. If omitted, an in-memory database will be used.
    #[clap(long)]
    db: Option<PathBuf>,

    #[clap(long)]
    docker_runtime: Option<String>,

    /// Optional log driver confi
    
    pub fn into_config(self) -> Result<DroneConfig> {
        let name = self.name.or_random();

        let log_config = self
            .log_config
            .map(|s| serde_json::from_str(&s))
            .transpose()?;

        let docker_config = PlaneDockerConfig {
            runtime: self.docker_runtime,
            log_config,
            mount_base: self.mount_base,
        };

        let ip: IpAddr = resolve_hostname(&self.ip)
            .ok_or_else(|| anyhow::anyhow!("Failed to resolve hostname to IP address."))?;

        let cleanup_min_age =
            Duration::try_seconds(self.auto_prune_containers_older_than_seconds as i64)
                .expect("valid duration");

        let drone_config = DroneConfig {
            controller_url: self.controller_url,
            name: name.clone(),
            cluster: self.cluster.clone(),
            ip,
            db_path: self.db,
            pool: self.pool.unwrap_or_default(),
            auto_prune: self.auto_prune_images,
            cleanup_min_age,
            docker_config,
        };

        Ok(drone_config)
    }