Naming Conventions¶
Traffic Server API は次の命名規則に従います。
The
TSprefix is used for all function and variable names defined in the Traffic Server API. Examples:TS_EVENT_NONE,TSMutex, andTSContCreateEnumerated values are always written in all uppercase letters. Examples:
TS_EVENT_NONEandTS_VC_CLOSE_ABORTConstant values are all uppercase; enumerated values can be seen as a subset of constants. Examples:
TS_URL_SCHEME_FILEandTS_MIME_FIELD_ACCEPTThe names of defined types are mixed-case. Examples:
TSHttpSsnandTSHttpTxnFunction names are mixed-case. Examples:
TSUrlCreateandTSContDestroyFunction names use the following subject-verb naming style:
TS-<subject>-<verb>, where<subject>goes from general to specific. This makes it easier to determine what a function does by reading its name. For example: the function to retrieve the password field (the specific subject) from a URL (the general subject) isTSUrlPasswordGet.Common verbs like
Create,Destroy,Get,Set,Copy,Find,Retrieve,Insert,Remove, andDeleteare used only when appropriate.