Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-542

API: Update documentation for "Txn" and "Ssn" data API changes and additions

Add voteWatch issue
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • Docs
    • Documentation, TS API
    • None

    Description

      I've modified and augmented the APIs for handling TXN (and now Sessions / SSN) private data. The two existing APIs have changed names (and prototypes), and there are a few additional APIs. See the "diffs" below for a brief description of what the changes. As for usage, the intent is still the same, to have per transaciton and per session plugin data, that can be shared across plugins (and in the case with the SSN data, shared between multiple transactions on the same sessions).

      • tsapi int TSHttpTxnGetMaxArgCnt(void);
      • tsapi TSReturnCode TSHttpTxnSetArg(TSHttpTxn txnp, int arg_idx, void *arg);
      • tsapi TSReturnCode TSHttpTxnGetArg(TSHttpTxn txnp, int arg_idx, void **arg);
        +
        + tsapi TSReturnCode TSHttpTxnArgSet(TSHttpTxn txnp, int arg_idx, void *arg);
        + tsapi TSReturnCode TSHttpTxnArgGet(TSHttpTxn txnp, int arg_idx, void **arg);
        + tsapi TSReturnCode TSHttpSsnArgSet(TSHttpSsn ssnp, int arg_idx, void *arg);
        + tsapi TSReturnCode TSHttpSsnArgGet(TSHttpSsn ssnp, int arg_idx, void **arg);
        +
        + /* The reserve API should only be use in TSAPI plugins, during plugin initialization! */
        + /* The lookup methods can be used anytime, but are best used during initialization as well,
        + or at least "cache" the results for best performance. */
        + tsapi TSReturnCode TSHttpArgIndexReserve(const char* name, const char* description, int* arg_idx);
        + tsapi TSReturnCode TSHttpArgIndexNameLookup(const char* name, int* arg_idx, const char** description);
        + tsapi TSReturnCode TSHttpArgIndexLookup(int arg_idx, const char** name, const char** description);
        +
        + /** @deprecated */
        + tsapi TS_DEPRECATED int TSHttpTxnMaxArgCntGet(void);

      Attachments

        Activity

          People

            jsime Jon Sime
            zwoop Leif Hedstrom

            Dates

              Created:
              Updated:

              Slack

                Issue deployment