TSAPI Types

Synopsis

#include <ts/ts.h>
#include <ts/remap.h>

Description

The Apache Traffic Server API provides large number of types. Many of them are specific to a particular API function or function group, but others are used more widely. Those are described on this page.

ink_hrtime ink_hrtime.h line 45
TSAction apidefs.h line 813
TSCacheKey apidefs.h line 802
TSConfig apidefs.h line 810
TSConfigDestroyFunc apidefs.h line 823
TSCont apidefs.h line 811

An opaque type that represents a Traffic Server continuation.

TSEvent apidefs.h line 358

TSEvents are sent to continuations when they are called back.

The TSEvent provides the continuation’s handler function with information about the callback. Based on the event it receives, the handler function can decide what to do.

TSEventFunc apidefs.h line 822
TSFile apidefs.h line 793
TSHostLookupResult apidefs.h line 818
TSHRTime apidefs.h line 755

“High Resolution Time”

A 64 bit time value, measured in nanoseconds.

TSHttpHookID apidefs.h line 263

An enumeration that identifies a specific type of hook for HTTP transactions.

TSHttpParser apidefs.h line 801
TSHttpSsn apidefs.h line 797

An opaque type that represents a Traffic Server session.

TSHttpStatus apidefs.h line 147

This set of enums represents possible return values from TSHttpHdrStatusGet(), which retrieves the status code from an HTTP response header (TSHttpHdrStatusGet() retrieves status codes only from headers of type TS_HTTP_TYPE_RESPONSE).

You can also set the TSHttpStatus of a response header using TSHttpHdrStatusSet().

TSHttpTxn apidefs.h line 798

An opaque type that represents a Traffic Server HTTP transaction.

TSHttpType apidefs.h line 132

This set of enums represents the possible HTTP types that can be assigned to an HTTP header.

When a header is created with TSHttpHdrCreate(), it is automatically assigned a type of TS_HTTP_TYPE_UNKNOWN. You can modify the HTTP type ONCE after it the header is created, using TSHttpHdrTypeSet(). After setting the HTTP type once, you cannot set it again. Use TSHttpHdrTypeGet() to obtain the TSHttpType of an HTTP header.

TSIOBuffer apidefs.h line 814
TSIOBufferBlock apidefs.h line 816
TSIOBufferReader apidefs.h line 817
TSIOBufferSizeIndex apidefs.h line 513
TSLifecycleHookID apidefs.h line 341

An enumeration that identifies a life cycle hook.

TSMBuffer apidefs.h line 796
TSMgmtCounter apidefs.h line 789
TSMgmtFloat apidefs.h line 790

The type used internally for a floating point value. This corresponds to the value TS_RECORDDATATYPE_FLOAT for TSRecordDataType.

TSMgmtInt apidefs.h line 788

The type used internally for an integer. This corresponds to the value TS_RECORDDATATYPE_INT for TSRecordDataType.

TSMgmtString apidefs.h line 791
TSMimeParser apidefs.h line 800
TSMLoc apidefs.h line 795
TSMutex apidefs.h line 809
TSParseResult apidefs.h line 114

This set of enums are possible values returned by TSHttpHdrParseReq() and TSHttpHdrParseResp().

TSPluginRegistrationInfo apidefs.h line 102

The following struct is used by TSPluginRegister().

It stores registration information about the plugin.

TSRecordDataType apidefs.h line 585

An enumeration that specifies the type of a value in an internal data structure that is accessible via the API.

TSRemapInterface remap.h line 44
TSRemapRequestInfo remap.h line 65
TSRemapStatus remap.h line 70
TSReturnCode apidefs.h line 535

An indicator of the results of an API call. A value of TS_SUCCESS means the call was successful. Any other value indicates a failure and is specific to the API call.

TSSDKVersion apidefs.h line 529

Starting 2.0, SDK now follows same versioning as Traffic Server.

TSServerState apidefs.h line 450
TSTextLogObject ts.h line 2005

This type represents a custom log file that you create with TSTextLogObjectCreate().

Your plugin writes entries into this log file using TSTextLogObjectWrite().

TSThread apidefs.h line 808
TSThreadFunc apidefs.h line 821
TSThreadPool apidefs.h line 743
TSVConn apidefs.h line 812
TSVIO apidefs.h line 807