All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.kroxylicious.proxy.config.Configuration Maven / Gradle / Ivy

/*
 * Copyright Kroxylicious Authors.
 *
 * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
 */
package io.kroxylicious.proxy.config;

import java.util.List;
import java.util.Map;

import io.kroxylicious.proxy.config.admin.AdminHttpConfiguration;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

public record Configuration(@Nullable AdminHttpConfiguration adminHttp,
                            Map virtualClusters,
                            List filters,
                            List micrometer,
                            boolean useIoUring) {
    public @Nullable AdminHttpConfiguration adminHttpConfig() {
        return adminHttp();
    }

    public List getMicrometer() {
        return micrometer() == null ? List.of() : micrometer();
    }

    public boolean isUseIoUring() {
        return useIoUring();
    }

    public @NonNull List virtualClusterModel() {
        return virtualClusters.entrySet().stream()
                .map(entry -> entry.getValue().toVirtualClusterModel(entry.getKey()))
                .toList();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy