Parse the records.config configuration file. More...
#include "TextBuffer.h"
#include "Tokenizer.h"
#include "ink_defs.h"
#include "ink_string.h"
#include "P_RecFile.h"
#include "P_RecUtils.h"
#include "P_RecMessage.h"
#include "P_RecCore.h"
#include "I_Layout.h"
Go to the source code of this file.
Functions | |
void | RecConfigFileInit (void) |
static int | RecFileImport_Xmalloc (const char *file, char **file_buf, int *file_size) |
const char * | RecConfigOverrideFromEnvironment (const char *name, const char *value) |
int | RecConfigFileParse (const char *path, RecConfigEntryCallback handler, bool inc_version) |
Variables | |
const char * | g_rec_config_fpath = NULL |
LLQ * | g_rec_config_contents_llq = NULL |
InkHashTable * | g_rec_config_contents_ht = NULL |
ink_mutex | g_rec_config_lock |
Parse the records.config configuration file.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file RecConfigParse.cc.
void RecConfigFileInit | ( | void | ) |
Definition at line 44 of file RecConfigParse.cc.
References create_queue(), g_rec_config_contents_ht, g_rec_config_lock, ink_hash_table_create(), ink_mutex_init(), and InkHashTableKeyType_String.
Referenced by RecCoreInit().
int RecConfigFileParse | ( | const char * | path, | |
RecConfigEntryCallback | handler, | |||
bool | inc_version | |||
) |
Definition at line 111 of file RecConfigParse.cc.
References ats_free(), ats_malloc(), ats_strdup, dequeue(), DL_Note, DL_Warning, enqueue(), RecConfigFileEntry::entry, RecConfigFileEntry::entry_type, g_rec_config_contents_ht, g_rec_config_lock, Tokenizer::Initialize(), ink_hash_table_create(), ink_hash_table_destroy(), ink_hash_table_insert(), ink_mutex_acquire(), ink_mutex_release(), InkHashTableKeyType_String, Tokenizer::iterFirst(), Tokenizer::iterNext(), queue_is_empty(), REC_ERR_FAIL, RecConfigOverrideFromEnvironment(), RecDebug(), RecFileImport_Xmalloc(), RecLog(), and SHARE_TOKS.
Referenced by RecReadConfigFile().
const char* RecConfigOverrideFromEnvironment | ( | const char * | name, | |
const char * | value | |||
) |
Definition at line 86 of file RecConfigParse.cc.
References ats_strdup, and ParseRules::ink_toupper().
Referenced by RecConfigFileParse().
static int RecFileImport_Xmalloc | ( | const char * | file, | |
char ** | file_buf, | |||
int * | file_size | |||
) | [static] |
Definition at line 55 of file RecConfigParse.cc.
References ats_free(), ats_malloc(), REC_ERR_FAIL, REC_HANDLE_INVALID, RecFileClose(), RecFileGetSize(), RecFileOpenR(), and RecFileRead().
Referenced by RecConfigFileParse().
InkHashTable* g_rec_config_contents_ht = NULL |
Definition at line 37 of file RecConfigParse.cc.
Referenced by RecConfigFileInit(), RecConfigFileParse(), and RecSyncConfigToTB().
LLQ* g_rec_config_contents_llq = NULL |
Definition at line 36 of file RecConfigParse.cc.
Referenced by RecSyncConfigToTB().
const char* g_rec_config_fpath = NULL |
Definition at line 35 of file RecConfigParse.cc.
Referenced by RecCoreInit(), RecReadConfigFile(), and RecWriteConfigFile().
Definition at line 38 of file RecConfigParse.cc.
Referenced by RecConfigFileInit(), RecConfigFileParse(), RecCoreInit(), and RecSyncConfigToTB().