mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-14 21:31:00 +01:00
MINOR: cfgparse: add struct cfgfile to represent config in memory
This and following commits serve to prepare loading configuration files in memory, before parsing them, as we may need to parse some parts of configuration in different moments of the startup sequence. This is a case of the new master-worker initialization process. Here we need to read at first only the global and the program sections and only after some steps (forking worker, etc) the rest of the configuration. Add a new structure cfgfile to keep configuration files metadata and content, loaded somewhere in a memory. Instances of filled cfgfile structures could be chained in a list, as the order in which they were loaded is important.
This commit is contained in:
parent
a6d1eb8f5d
commit
70b842e847
@ -90,6 +90,14 @@ struct cfg_postparser {
|
||||
int (*func)();
|
||||
};
|
||||
|
||||
/* store in memory config files meta data and content */
|
||||
struct cfgfile {
|
||||
struct list list;
|
||||
char *filename; /* config file name */
|
||||
char *content; /* allocated str with config file content */
|
||||
ssize_t size; /* size of stored file or error indication (-1) */
|
||||
};
|
||||
|
||||
extern struct list postparsers;
|
||||
extern int cfg_maxpconn;
|
||||
extern int cfg_maxconn;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user