com.spotify.helios.cli.CliConfig Maven / Gradle / Ivy
/*
* Copyright (c) 2014 Spotify AB.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.spotify.helios.cli;
import com.google.common.base.Joiner;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.collect.Lists;
import com.fasterxml.jackson.core.type.TypeReference;
import com.spotify.helios.common.Json;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import static com.google.common.base.Preconditions.checkNotNull;
public class CliConfig {
private static final String HTTP_SCHEME = "http";
private static final String DOMAIN_SCHEME = "domain";
private static final String DEPRECATED_SITE_SCHEME = "site";
private static final String MASTER_ENDPOINTS_KEY = "masterEndpoints";
private static final String DOMAINS_KEY = "domains";
private static final String SRV_NAME_KEY = "srvName";
private static final String CONFIG_DIR = ".helios";
private static final String CONFIG_FILE = "config";
private static final String CONFIG_PATH = CONFIG_DIR + File.separator + CONFIG_FILE;
public static final List EMPTY_STRING_LIST = Collections.emptyList();
public static final TypeReference
© 2015 - 2025 Weber Informatics LLC | Privacy Policy