This book has the following basic components:
Introduction and overview
Tutorials about writing specific kinds of plugins: HTTP header-based plugins, content transformation plugins, and protocol plugins
Guides about specific interfaces
Reference material
If you're new to writing Traffic Server plugins, then read Getting Started and Creating Traffic Server Plugins, and use the remaining chapters as needed. Header-Based Plugin Examples provides details about plugins that work on HTTP headers, while HTTP Transformation Plugins explains how to write a plugin that transforms or scans the body of an HTTP response. New Protocol Plugins provides essential information if you want to support your own protocol on Traffic Server.
You can look up information in the following reference sections:
Below is a section-by-section breakdown of this guide:
How to compile and load plugins. Walks through a simple "hello world" example; explains how to initialize and register plugins.
Basic structures that all plugins use: events, continuations, and how to hook on to Traffic Server processes. Detailed explication of a sample blacklisting plugin.
(( Remap plugin description here ))
Detailed explanation about writing plugins that work on HTTP headers; discusses sample blacklisting and basic authorization plugins.
Detailed explanation of the null-transform example; also discusses vconnections, VIOs, and IO buffers.
Detailed explanation of a sample protocol plugin that supports a synthetic protocol. Discusses vconnections and mutexes, as well as the the new netconnection, DNS lookup, logging, and cache APIs.
(( Cache plugin description here ))
The remaining sections comprise the API function reference and are organized by function type:
Details error-writing and tracing functions, thread functions,
and Traffic Server API versions of the malloc
and fopen
families.
The Traffic Server API versions overcome various C library
limitations.
Functions in this chapter hook your plugin to Traffic Server HTTP processes.
Contains instructions for implementing performance enhancements for all plugins that manipulate HTTP headers. These functions examine and modify HTTP headers, MIME headers, URLs, and the marshal buffers that contain header information. If you are working with headers, then be sure to read this chapter.
Continuations provide the basic callback mechanism and data abstractions used in Traffic Server.
Describes how to use INKActions
and the INKDNSLookup
API.
Describes how to use the Traffic Server IO interfaces:
INKVConnection
, INKVIO
, INKIOBuffer
,
INKNetVConnection
, the Cache API.
These functions enable you to set up a configuration interface for plugins, access installed plugin files, and set up plugin licensing.
These functions add statistics to your plugin.
A list of all functions in the Traffic Server API, grouped by functionality.