Package com.linecorp.centraldogma.server
Class CentralDogmaConfig
java.lang.Object
com.linecorp.centraldogma.server.CentralDogmaConfig
CentralDogma
server configuration.-
Method Summary
Modifier and TypeMethodDescriptionReturns the access log format.Returns theAuthConfig
.Deprecated.Returns the sources that determines a client address.static String
convertValue
(String value, String propertyName) Converts the specifiedvalue
usingConfigValueConverter
if the specifiedvalue
starts with a prefix followed by a colon':'
.Returns theCorsConfig
.dataDir()
Returns the data directory.Returns the graceful shutdown timeout.Returns the timeout of an idle connection in milliseconds.boolean
Returns whether a CSRF token is required for Thrift clients.boolean
Returns whether web app is enabled.static CentralDogmaConfig
Loads the configuration from the specifiedFile
.static CentralDogmaConfig
Loads the configuration from the specified JSON string.Returns theManagementConfig
.Returns the maximum length of request content in bytes.Returns the maximum number of established connections.long
Returns the maximum age of a removed repository in milliseconds.Returns the number of event loop threads.Map
<Class<?>, PluginConfig> Returns the map ofPluginConfig
s.Returns the list ofPluginConfig
s.ports()
Returns theServerPort
s.Returns theReplicationConfig
.Returns the cache spec of the repository cache.Returns the request timeout in milliseconds.tls()
Returns the TLS configuration.toString()
Returns the IP addresses of the trusted proxy servers.Returns the title of the web app.Returns the maximum allowed write quota perRepository
.zone()
Returns the zone information of the server.
-
Method Details
-
convertValue
Converts the specifiedvalue
usingConfigValueConverter
if the specifiedvalue
starts with a prefix followed by a colon':'
. -
load
public static CentralDogmaConfig load(File configFile) throws JsonMappingException, JsonParseException Loads the configuration from the specifiedFile
. -
load
Loads the configuration from the specified JSON string. -
dataDir
Returns the data directory. -
ports
Returns theServerPort
s. -
tls
Returns the TLS configuration. -
trustedProxyAddresses
Returns the IP addresses of the trusted proxy servers. If trusted, the sources specified inclientAddressSources()
will be used to determine the actual IP address of clients. -
clientAddressSources
Returns the sources that determines a client address. For example:"forwarded"
"x-forwarded-for"
"PROXY_PROTOCOL"
-
numWorkers
Returns the number of event loop threads. -
maxNumConnections
Returns the maximum number of established connections. -
requestTimeoutMillis
Returns the request timeout in milliseconds. -
idleTimeoutMillis
Returns the timeout of an idle connection in milliseconds. -
maxFrameLength
Returns the maximum length of request content in bytes. -
maxRemovedRepositoryAgeMillis
public long maxRemovedRepositoryAgeMillis()Returns the maximum age of a removed repository in milliseconds. A removed repository is first marked as removed, and then is purged permanently once the amount of time returned by this property passes since marked. -
cacheSpec
Deprecated.Returns therepositoryCacheSpec
. -
repositoryCacheSpec
Returns the cache spec of the repository cache. -
gracefulShutdownTimeout
Returns the graceful shutdown timeout. -
isWebAppEnabled
public boolean isWebAppEnabled()Returns whether web app is enabled. -
webAppTitle
Returns the title of the web app. -
replicationConfig
Returns theReplicationConfig
. -
isCsrfTokenRequiredForThrift
public boolean isCsrfTokenRequiredForThrift()Returns whether a CSRF token is required for Thrift clients. Note that it's not safe to enable this feature. It only exists for a legacy Thrift client that does not send a CSRF token. -
accessLogFormat
Returns the access log format. -
authConfig
Returns theAuthConfig
. -
writeQuotaPerRepository
Returns the maximum allowed write quota perRepository
. -
corsConfig
Returns theCorsConfig
. -
pluginConfigs
Returns the list ofPluginConfig
s. -
pluginConfigMap
Returns the map ofPluginConfig
s. -
managementConfig
Returns theManagementConfig
. -
zone
Returns the zone information of the server. Note that the zone must be specified to use thePluginTarget.ZONE_LEADER_ONLY
target. -
toString
-
repositoryCacheSpec()
.