Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-10214

Improved documentation for the KTX (Kotlin Extensions) package

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • Mobile 2.8
    • Mobile
    • None
    • 1

    Description

      As noted in this forum post:
      https://forums.couchbase.com/t/kotlin-extensions-docs-fix/33880

      Our documentation does not demonstrate one of the neatest features of the extension package:

      The docs also allude to another potential feature of these extension functions, which is

      overriding the receiver’s values with the passed parameters

      But none of the examples actually show the API being used this way, always calling the API from the *Factory variables, which are null and wouldn’t have any receiver values to override.

      The idea is that you can do something like this:

      val l1 = URLEndpointListenerConfigurationFactory.create(
          networkInterface="en0",
         port=8080)
      val l2 = l1.create(port=8081)
      

      l1 is a configuration for a listener that will listen on port 8080, on interface "en0". {l2}} is a configuration for a listener that will listen on port 8081, on the same interface.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hakim.cassimally Hakim Cassimally
            blake.meike Blake Meike
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty