Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
md_status.h File Reference
#include "md_store.h"
Include dependency graph for md_status.h:

Go to the source code of this file.

Data Structures

struct  md_job_t
 

Typedefs

typedef struct md_job_t md_job_t
 

Functions

apr_status_t md_status_get_md_json (struct md_json_t **pjson, const md_t *md, struct md_reg_t *reg, struct md_ocsp_reg_t *ocsp, apr_pool_t *p)
 
apr_status_t md_status_get_json (struct md_json_t **pjson, apr_array_header_t *mds, struct md_reg_t *reg, struct md_ocsp_reg_t *ocsp, apr_pool_t *p)
 
void md_status_take_stock (struct md_json_t **pjson, apr_array_header_t *mds, struct md_reg_t *reg, apr_pool_t *p)
 
md_job_tmd_job_make (apr_pool_t *p, md_store_t *store, md_store_group_t group, const char *name)
 
void md_job_set_group (md_job_t *job, md_store_group_t group)
 
apr_status_t md_job_load (md_job_t *job)
 
apr_status_t md_job_save (md_job_t *job, struct md_result_t *result, apr_pool_t *p)
 
void md_job_log_append (md_job_t *job, const char *type, const char *status, const char *detail)
 
md_json_tmd_job_log_get_latest (md_job_t *job, const char *type)
 
apr_time_t md_job_log_get_time_of_latest (md_job_t *job, const char *type)
 
void md_job_start_run (md_job_t *job, struct md_result_t *result, md_store_t *store)
 
void md_job_end_run (md_job_t *job, struct md_result_t *result)
 
void md_job_retry_at (md_job_t *job, apr_time_t later)
 
apr_time_t md_job_delay_on_errors (int err_count)
 
void md_job_set_notify_cb (md_job_t *job, md_job_notify_cb *cb, void *baton)
 
apr_status_t md_job_notify (md_job_t *job, const char *reason, struct md_result_t *result)
 
void md_job_holler (md_job_t *job, const char *reason)
 

Typedef Documentation

typedef struct md_job_t md_job_t

Function Documentation

apr_time_t md_job_delay_on_errors ( int  err_count)
void md_job_end_run ( md_job_t job,
struct md_result_t result 
)
void md_job_holler ( md_job_t job,
const char *  reason 
)
apr_status_t md_job_load ( md_job_t job)

Update the job from storage in <group>/job->mdomain.

void md_job_log_append ( md_job_t job,
const char *  type,
const char *  status,
const char *  detail 
)

Append to the job's log. Timestamp is automatically added.

Parameters
typetype of log entry
statusstatus of entry (maybe NULL)
detaildescription of what happened
md_json_t* md_job_log_get_latest ( md_job_t job,
const char *  type 
)

Retrieve the latest log entry of a certain type.

apr_time_t md_job_log_get_time_of_latest ( md_job_t job,
const char *  type 
)

Get the time the latest log entry of the given type happened, or 0 if none is found.

md_job_t* md_job_make ( apr_pool_t p,
md_store_t store,
md_store_group_t  group,
const char *  name 
)

Create a new job instance for the given MD name. Job load/save will work using the name.

apr_status_t md_job_notify ( md_job_t job,
const char *  reason,
struct md_result_t result 
)
void md_job_retry_at ( md_job_t job,
apr_time_t  later 
)
apr_status_t md_job_save ( md_job_t job,
struct md_result_t result,
apr_pool_t p 
)

Update storage from job in <group>/job->mdomain.

void md_job_set_group ( md_job_t job,
md_store_group_t  group 
)
void md_job_set_notify_cb ( md_job_t job,
md_job_notify_cb cb,
void baton 
)
void md_job_start_run ( md_job_t job,
struct md_result_t result,
md_store_t store 
)
apr_status_t md_status_get_json ( struct md_json_t **  pjson,
apr_array_header_t mds,
struct md_reg_t reg,
struct md_ocsp_reg_t ocsp,
apr_pool_t p 
)

Get a JSON summary of all MDs and their status.

apr_status_t md_status_get_md_json ( struct md_json_t **  pjson,
const md_t md,
struct md_reg_t reg,
struct md_ocsp_reg_t ocsp,
apr_pool_t p 
)

Get a JSON summary of the MD and its status (certificates, jobs, etc.).

void md_status_take_stock ( struct md_json_t **  pjson,
apr_array_header_t mds,
struct md_reg_t reg,
apr_pool_t p 
)

Take stock of all MDs given for a short overview. The JSON returned will carry integers for MD_KEY_COMPLETE, MD_KEY_RENEWING, MD_KEY_ERRORED, MD_KEY_READY and MD_KEY_TOTAL.