syslog-ng source
python-persist.c File Reference
#include "python-persist.h"
#include "persistable-state-header.h"
#include "python-helpers.h"
#include "python-types.h"
#include "python-main.h"
#include "syslog-ng.h"
#include "driver.h"
#include "mainloop.h"
#include "compat/compat-python.h"
#include <structmember.h>
Include dependency graph for python-persist.c:

Classes

struct  Entry
 

Macros

#define SUBKEY_DELIMITER   "##"
 
#define MASTER_ENTRY_VERSION   1
 

Typedefs

typedef PersistableStateHeader PythonPersistMasterEntry
 

Enumerations

enum  EntryType { ENTRY_TYPE_STRING , ENTRY_TYPE_LONG , ENTRY_TYPE_BYTES , ENTRY_TYPE_MAX }
 

Functions

 G_STATIC_ASSERT (offsetof(Entry, data)==sizeof(guint8)+offsetof(Entry, type))
 
const gchar * python_format_stats_key (LogPipe *p, StatsClusterKeyBuilder *kb, const gchar *module, PythonPersistMembers *options)
 
const gchar * python_format_persist_name (const LogPipe *p, const gchar *module, PythonPersistMembers *options)
 
PyObject * py_persist_type_iter (PyObject *o)
 
void py_persist_global_init (void)
 

Variables

PyTypeObject py_persist_type
 

Macro Definition Documentation

◆ MASTER_ENTRY_VERSION

#define MASTER_ENTRY_VERSION   1

◆ SUBKEY_DELIMITER

#define SUBKEY_DELIMITER   "##"

Typedef Documentation

◆ PythonPersistMasterEntry

Enumeration Type Documentation

◆ EntryType

enum EntryType
Enumerator
ENTRY_TYPE_STRING 
ENTRY_TYPE_LONG 
ENTRY_TYPE_BYTES 
ENTRY_TYPE_MAX 

Function Documentation

◆ G_STATIC_ASSERT()

G_STATIC_ASSERT ( offsetof(Entry, data)  = =sizeof(guint8)+offsetof(Entry, type))

◆ py_persist_global_init()

void py_persist_global_init ( void  )

◆ py_persist_type_iter()

PyObject* py_persist_type_iter ( PyObject *  o)

◆ python_format_persist_name()

const gchar* python_format_persist_name ( const LogPipe *  p,
const gchar *  module,
PythonPersistMembers options 
)

◆ python_format_stats_key()

const gchar* python_format_stats_key ( LogPipe *  p,
StatsClusterKeyBuilder *  kb,
const gchar *  module,
PythonPersistMembers options 
)

Variable Documentation

◆ py_persist_type

PyTypeObject py_persist_type
Initial value:
=
{
PyVarObject_HEAD_INIT(&PyType_Type, 0)
.tp_name = "Persist",
.tp_basicsize = sizeof(PyPersist),
.tp_dealloc = py_persist_dealloc,
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_doc = "Persist class encapsulates persist handling",
.tp_new = PyType_GenericNew,
.tp_init = _persist_type_init,
.tp_members = py_persist_type_members,
.tp_as_mapping = &py_persist_type_mapping,
.tp_iter = &py_persist_type_iter,
0,
}
PyObject * py_persist_type_iter(PyObject *o)
Definition: python-persist.c:514
Definition: python-persist.h:32