Package io.kroxylicious.proxy.config
Record Class Configuration
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.config.Configuration
- Record Components:
management- management configurationclusterDefinitions- Named target cluster definitions, referenced by virtual clusters and routes.filterDefinitions- A list of named filter definitions (names must be unique)defaultFilters- The names of thefilterDefinitions()to be use when aVirtualClusterdoesn't specify its ownVirtualCluster.filters().routerDefinitions- Named router definitions.virtualClusters- The virtual clustersmicrometer- The micrometer configuseIoUring- true to use iouringdevelopment- Development optionsnetwork- Controls aspects of network configuration for the proxy.proxyProtocol- PROXY protocol configuration.
public record Configuration(ManagementConfiguration management, List<ClusterDefinition> clusterDefinitions, List<NamedFilterDefinition> filterDefinitions, List<String> defaultFilters, List<RouterDefinition> routerDefinitions, List<VirtualCluster> virtualClusters, List<MicrometerDefinition> micrometer, boolean useIoUring, Optional<Map<String,Object>> development, NetworkDefinition network, ProxyProtocolConfig proxyProtocol)
extends Record
The root of the proxy configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionConfiguration(ManagementConfiguration management, List<ClusterDefinition> clusterDefinitions, List<NamedFilterDefinition> filterDefinitions, List<String> defaultFilters, List<RouterDefinition> routerDefinitions, List<VirtualCluster> virtualClusters, List<MicrometerDefinition> micrometer, boolean useIoUring, Optional<Map<String, Object>> development, NetworkDefinition network, ProxyProtocolConfig proxyProtocol) Creates an instance of configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclusterDefinitionsrecord component.Returns the value of thedefaultFiltersrecord component.Returns the value of thedevelopmentrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefilterDefinitionsrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themanagementrecord component.Returns the value of themicrometerrecord component.network()Returns the value of thenetworkrecord component.Returns the value of theproxyProtocolrecord component.Returns the value of therouterDefinitionsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseIoUringrecord component.virtualClusterModel(PluginFactoryRegistry pfr, String clusterName) Builds theVirtualClusterModelfor a single virtual cluster by name.Returns the value of thevirtualClustersrecord component.
-
Constructor Details
-
Configuration
public Configuration(@Nullable ManagementConfiguration management, @Nullable List<ClusterDefinition> clusterDefinitions, @Nullable List<NamedFilterDefinition> filterDefinitions, @Nullable List<String> defaultFilters, @Nullable List<RouterDefinition> routerDefinitions, List<VirtualCluster> virtualClusters, @Nullable List<MicrometerDefinition> micrometer, boolean useIoUring, Optional<Map<String, Object>> development, @Nullable NetworkDefinition network, @Nullable ProxyProtocolConfig proxyProtocol) Creates an instance of configuration.
-
-
Method Details
-
getMicrometer
-
isUseIoUring
public boolean isUseIoUring() -
proxyProtocolMode
-
virtualClusterModel
-
virtualClusterModel
Builds theVirtualClusterModelfor a single virtual cluster by name. UnlikevirtualClusterModel(PluginFactoryRegistry), this avoids constructing models (and therefore avoids running each filter'sinitialize()) for any virtual cluster other than the one requested. Used byOperationsPlannerso a reconfigure that targets one cluster doesn't orphan-initialise the filters of unrelated clusters.- Throws:
IllegalArgumentException- if no virtual cluster with that name exists in this configuration
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
management
Returns the value of themanagementrecord component.- Returns:
- the value of the
managementrecord component
-
clusterDefinitions
Returns the value of theclusterDefinitionsrecord component.- Returns:
- the value of the
clusterDefinitionsrecord component
-
filterDefinitions
Returns the value of thefilterDefinitionsrecord component.- Returns:
- the value of the
filterDefinitionsrecord component
-
defaultFilters
Returns the value of thedefaultFiltersrecord component.- Returns:
- the value of the
defaultFiltersrecord component
-
routerDefinitions
Returns the value of therouterDefinitionsrecord component.- Returns:
- the value of the
routerDefinitionsrecord component
-
virtualClusters
Returns the value of thevirtualClustersrecord component.- Returns:
- the value of the
virtualClustersrecord component
-
micrometer
Returns the value of themicrometerrecord component.- Returns:
- the value of the
micrometerrecord component
-
useIoUring
public boolean useIoUring()Returns the value of theuseIoUringrecord component.- Returns:
- the value of the
useIoUringrecord component
-
development
Returns the value of thedevelopmentrecord component.- Returns:
- the value of the
developmentrecord component
-
network
Returns the value of thenetworkrecord component.- Returns:
- the value of the
networkrecord component
-
proxyProtocol
Returns the value of theproxyProtocolrecord component.- Returns:
- the value of the
proxyProtocolrecord component
-