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_MD5

Buffer type sufficient to contain an MD5 hash value.

class INK_MD5

See INK_MD5.

class RecRawStatBlock

A data block intended to contain Traffic Server statistics.

TSAction
TSCacheKey
TSConfig
TSCont

An opaque type that represents a Traffic Server continuation.

TSEventFunc
TSFile
TSHostLookupResult

A type representing the result of a call to TSHostLookup(). Use with TSHostLookupResultAddrGet().

TSHRTime

“High Resolution Time”

A 64 bit time value, measured in nanoseconds.

TSHttpParser
TSHttpSsn

An opaque type that represents a Traffic Server session.

TSHttpTxn

An opaque type that represents a Traffic Server HTTP transaction.

TSIOBuffer
TSIOBufferBlock
TSIOBufferReader
TSIOBufferSizeIndex
TSLifecycleHookID

An enumeration that identifies a life cycle hook.

TSMBuffer

Internally, data for a transaction is stored in one more more header heaps. These are storage local to the transaction, and generally each HTTP header is stored in a separate one. This type is a handle to a header heap, and is provided or required by functions that locate HTTP header related data.

TSMgmtCounter
TSMgmtFloat

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

TSMgmtInt

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

TSMgmtString
TSMimeParser
TSMLoc

This is a memory location relative to a header heap represented by a TSMBuffer and must always be used in conjunction with that TSMBuffer instance. It identifies a specific object in the TSMBuffer. This indirection is needed so that the TSMBuffer can reallocate space as needed. Therefore a raw address obtained from a TSMLoc should be considered volatile that may become invalid across any API call.

TSMLoc TS_NULL_MLOC

A predefined null valued TSMLoc used to indicate the absence of an TSMLoc.

TSMutex
TSPluginRegistrationInfo

The following struct is used by TSPluginRegister().

It stores registration information about the plugin.

TSRemapInterface
TSRemapRequestInfo
TSSslX509

This type represents the X509 object created from an SSL certificate.

TSTextLogObject

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

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

TSThread

This represents an internal Traffic Server thread, created by the Traffic Server core. It is an opaque type which can be used only to check for equality / inequality, and passed to API functions. An instance that refers to the current thread can be obtained with TSThreadSelf().

TSEventThread

This type represents an event thread. It is an opaque which is used to specify a particular event processing thread in Traffic Server. If plugin code is executing in an event thread (which will be true if called from a hook or a scheduled event) then the current event thread can be obtained via TSEventThreadSelf().

A TSEventThread is also a TSThread and can be passed as an argument to any parameter of type TSThread.

TSThreadFunc
TSUuidVersion

A version value for at TSUuid.

TS_UUID_V4

A version 4 UUID. Currently only this value is used.

size_t TS_UUID_STRING_LEN

Length of a UUID string.

TSVConn

A virtual connection. This is the basic mechanism for abstracting I/O operations in Traffic Server.

TSNetVConnection

A subtype of TSVConn that provides additional IP network information and operations.

TSVIO
ModuleVersion

A module version.

type ModuleVersion

A module version.

template<typename T>
class DLL

An anchor for a double linked intrusive list of instance of T.

template<typename T>
class Queue
TSAcceptor
TSNextProtocolSet
class VersionNumber

A two part version number, defined in include/tscore/I_Version.h.

short int ink_major

Major version number.

short int ink_minor

Minor version number.