Reference
Static
Hemera.errors
Members
Hemera.ext()
hemera.ext(type, fn)
Register a new extension handler.
Hemera.setIdGenerator()
Updates the id generator. The generator is a synchronous function that will be used to generate identifiers for tracing. The default function generates random identifiers with a length of 16 characters.
hemera.setIdGenerator(fn)
Hemera.setSchemaCompiler()
Update the current request schema compiler.
hemera.setSchemaCompiler(fn)
Hemera.setResponseSchemaCompiler()
Update the current response schema compiler.
hemera.setSchemaCompiler(fn)
Hemera.setServerDecoder()
Update the server decoder.
hemera.setServerDecoder(fn)
Hemera.setServerEncoder()
Update the server encoder.
hemera.setServerEncoder(fn)
Hemera.setClientDecoder()
Update the client decoder.
hemera.setClientDecoder(fn)
Hemera.setClientEncoder()
Update the client encoder.
hemera.setClientEncoder(fn)
Hemera.setNotFoundPattern()
Update the notFound Pattern.
hemera.setNotFoundPattern(fn)
Hemera.hasDecorator()
Return a boolean whether the decorator is available.
hemera.hasDecorator(string)
Hemera.decorate()
Decorate the core hemera instance with the value.
hemera.decorate(name, value)
Hemera.expose()
Expose a value to the current hemera instance. It will effects all sibling and child scopes.
hemera.expose(name, value)
Hemera.use()
Register a plugin.
hemera.use(plugin, options)
Hemera.createError()
Create a new native error which can be serialized and deserialized across processe.
hemera.createError(name)
Hemera.fatal()
Gracefully shutdown hemera and exit the process with code 1
hemera.fatal()
Hemera.ready()
Bootstrap hemera and all plugins.
hemera.ready(cb)
Hemera.subscribe()
Create a new server action.
hemera.subscribe(pattern, cb)
Hemera.add()
Registers a new server action which can be called from any client.
hemera.add(pattern, cb)
Hemera.act()
Start a new request.
hemera.act(pattern, cb)
Hemera.remove()
Removes a single subscription by id or a whole service by topic name.
hemera.remove(topic)
Hemera.list()
Returns all registered server actions.
hemera.list()
Hemera.close()
Gracefully shutdown hemera. Can be called only once. If you are looking for to register multiple handlers look at the
onClose
extension.
hemera.close(fn)
Hemera.router
Returns the bloomrun
instance.
hemera.router
Hemera.load
Returns the load
instance.
hemera.load
Hemera.transport
Returns the abstract transport implementation for NATS.
hemera.transport
Hemera.topics
Returns all registered topcis.
hemera.topics
Hemera.config
Returns the hemera configuration.
hemera.config
Hemera.notFoundPattern
Returns the notFound Pattern.
hemera.notFoundPattern
Server action context
These properties are only accessible inside an Add
handler.
Hemera.matchedAction
Returns the current Add
instance of the server action.
hemera.response
Hemera.reply
Returns the current server reply object.
hemera.reply
Hemera.request
Returns the current server request object.
hemera.request
Hemera.response
Returns the current server response object.
hemera.response
Client action context
These properties are only accessible inside an Act
handler.
Hemera.request
Returns the current client request object.
hemera.request
Hemera.response
Returns the current client response object.
hemera.response