MCPcopy Create free account
hub / github.com/apache/trafficserver / TSRemapNewInstance

Function TSRemapNewInstance

plugins/cachekey/plugin.cc:149–164  ·  view source on GitHub ↗

* @brief Plugin new instance entry point. * * Processes the configuration and initializes the plugin instance. * @param argc plugin arguments number * @param argv plugin arguments * @param instance new plugin instance pointer (initialized in this function) * @param errBuf error message buffer * @param errBufSize error message buffer size * @return TS_SUCCES if success or TS_ERROR if failur

Source from the content-addressed store, hash-verified

147 * @return TS_SUCCES if success or TS_ERROR if failure
148 */
149TSReturnCode
150TSRemapNewInstance(int argc, char *argv[], void **instance, char * /* errBuf ATS_UNUSED */, int /* errBufSize ATS_UNUSED */)
151{
152 Configs *config = new Configs();
153 if (nullptr != config && config->init(argc, const_cast<const char **>(argv), /* perRemapConfig */ true)) {
154 *instance = config;
155 } else {
156 CacheKeyError("failed to initialize the remap plugin");
157 *instance = nullptr;
158 delete config;
159 return TS_ERROR;
160 }
161
162 CacheKeyDebug("remap plugin initialized");
163 return TS_SUCCESS;
164}
165
166/**
167 * @brief Plugin instance deletion clean-up entry point.

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected