gobj_service_factory()

gobj_service_factory()#

Creates a service gobj using gobj_create_tree0() and registers it as a service.

Prototype

hgobj gobj_service_factory(
    const char  *name,
    json_t      *jn_service_config // owned
);

Parameters

Key

Type

Description

name

const char *

The name of the service to be created.

jn_service_config

json_t *

A JSON object containing the service configuration. This parameter is owned and will be consumed by the function.


Return Value

Returns a handle to the created service gobj, or NULL if the creation fails.

Notes

The function extracts global settings, applies configuration variables, and invokes gobj_create_tree0() to instantiate the service.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples