konfig | Simple config properties API for Kotlin | Configuration Management library

 by   npryce Kotlin Version: Current License: Apache-2.0

kandi X-RAY | konfig Summary

kandi X-RAY | konfig Summary

konfig is a Kotlin library typically used in Devops, Configuration Management applications. konfig has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Konfig provides an extensible, type-safe API for configuration properties gathered from multiple sources — built in resources, system properties, property files, environment variables, command-line arguments, etc. A secondary goal of Konfig is to make configuration "self explanatory”. Misconfiguration errors are reported with the location and “true name” of the badly configured property. E.g. a program may look up a key defined as Key("http.port", intType). At runtime, it will be parsed from an environment variable named HTTP_PORT. So the error message reports the name of the environment variable, so that the user can easily find and fix the error. Configuration can be inspected and listed. For example, it can be exposed by HTTP to a network management system to help site reliability engineers understand the current configuration of a running application.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              konfig has a low active ecosystem.
              It has 254 star(s) with 36 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 9 open issues and 22 have been closed. On average issues are closed in 145 days. There are 6 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of konfig is current.

            kandi-Quality Quality

              konfig has 0 bugs and 0 code smells.

            kandi-Security Security

              konfig has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              konfig code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              konfig is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              konfig releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of konfig
            Get all kandi verified functions for this library.

            konfig Key Features

            No Key Features are available at this moment for konfig.

            konfig Examples and Code Snippets

            No Code Snippets are available at this moment for konfig.

            Community Discussions

            QUESTION

            Multiple REST API calls in succession returns undefined
            Asked 2020-Dec-17 at 20:54

            I'm trying to query some JIRA issues using a the jira-connector package. I'm running into issues with the data returned not being defined until after everything else is executed in my code. I'm not sure if this is some issue with concurrency, but I can't for the life of me figure out where and how I'm messing up.

            If inside the getJiraTimeEstimations function only call the getJiraTimeEstimate once it works just fine and I get access to the data to use further down in the program. It is when I'm trying to do it inside a map or foreach where I iterate over the Array.from(dataFromMaconomy.keys()) array that I seem to run into issues.

            My understanding is that adding .then().catch() in the getJiraTimeEstimate function should be enough to stop it from continuing to run before all the calls are finished? Or am I misunderstanding how asynchronous calls work in Node and JS?

            I've also tried converting it to an async getJiraTimeEstimations and adding an await infront of the search. But it doesn't seem to work either.

            I am not populating the dataFromMaconomy array as I'm debugging. Which is what I was trying to do with the log statement. The log statement just prints undefined right now. But if I only call it with a single item from the rks array then it works fine.

            ...

            ANSWER

            Answered 2020-Dec-17 at 20:54

            Giving your clarification in the comment, the getJiraTimeEstimate() function does not return anything. Try:

            Source https://stackoverflow.com/questions/65347943

            QUESTION

            Shadow jar missing common java classes
            Asked 2020-Nov-05 at 06:07

            I'm packaging a shadow jar of my app. The app uses kotlin and some external dependencies. All dependencies are in my jar but i get the following exception during runtime:

            java.lang.NoSuchMethodError: java.util.Optional.isEmpty()Z

            The Z at the end is always there; I don't where it comes from.

            I checked multiple example of build.gradle files and mine seems to be good.

            ...

            ANSWER

            Answered 2020-Nov-05 at 06:07

            Your runtime Java Version is lower than the compile-time Java version

            Optional.isEmpty() is from JDK 11+, its not in JDK 8,9

            the build.gradle is fine.

            just run with JDK 11

            Source https://stackoverflow.com/questions/64690802

            QUESTION

            Why does updating Gradle break log4j imports?
            Asked 2020-Sep-01 at 05:38

            I am attempting to update to Kotlin 1.4. In my build.gradle file, I have the following:

            ...

            ANSWER

            Answered 2020-Aug-31 at 15:01
            Use dependencyInsight to see what's going wrong

            It sounds like what's happening is that the version of log4j that ends up being used isn't the version you were expecting.

            Dependency version resolution can get pretty complicated, especially when you have lots of dependencies. Different things want different versions of the same dependency, but Gradle has to pick one version that will end up on the classpath. In general, it will pick the newest version from among all the versions that have been requested.

            There are two reasons I can think of that upgrading Gradle might have changed the version of log4j that ends up being used:

            • Something in Gradle itself could be adding a dependency on log4j, and might now be requesting a newer version than was used in the older Gradle distribution.
            • On the other hand, it's possible that the way version conflicts are resolved has actually subtly changed in the newer version of Gradle.

            Luckily, Gradle gives you some tools to help figure out what's going on. I would suggest comparing the output of the following command both before and after updating the Gradle version.

            Source https://stackoverflow.com/questions/63570680

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install konfig

            To get started, add com.natpryce:konfig:<version> as a dependency, import com.natpryce.konfig.* and then:.
            Define typed property keys val server_port = Key("server.port", intType) val server_host = Key("server.host", stringType)
            Build a Configuration object that loads properties: val config = systemProperties() overriding EnvironmentVariables() overriding ConfigurationProperties.fromFile(File("/etc/myservice.properties")) overriding ConfigurationProperties.fromResource("defaults.properties")
            Define some properties. For example, in defaults.properties: server.port=8080 server.host=0.0.0.0
            Look up properties by key. They are returned as typed values, not strings, and so can be used directly: val server = Server(config[server_port], config[server_host]) server.start()
            Java property files and resources
            Java system properties
            Environment variables
            Hard-coded maps (with convenient syntax)
            Command-line parameters (with long and short option syntax)

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/npryce/konfig.git

          • CLI

            gh repo clone npryce/konfig

          • sshUrl

            git@github.com:npryce/konfig.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Configuration Management Libraries

            dotfiles

            by mathiasbynens

            consul

            by hashicorp

            viper

            by spf13

            eureka

            by Netflix

            confd

            by kelseyhightower

            Try Top Libraries by npryce

            adr-tools

            by npryceShell

            hamkrest

            by npryceKotlin

            make-it-easy

            by npryceJava

            rusty-pi

            by npryceRust

            snodge

            by npryceKotlin