Skip to content

Commit

Permalink
v0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
bahung1221 committed Dec 30, 2019
1 parent b54a798 commit 35e8921
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -8,7 +8,7 @@ This library is under construction, so use at your own risk

### Why microsia?
Microsia is an lightweight microservices server with simple, familiar syntax that was inspired by [koa](https://github.com/koajs/koa) and [express](https://github.com/expressjs/express),
allow you create transport layer for microservices as quick as possible.
allow you to create transport layer for microservices as quick as possible.

Currently, microsia is building around [nats](https://github.com/nats-io/nats-server) as central messaging system.
Microsia also has local pubsub system, that allow services on same server communicate with each other fastest without remote messaging system (nats).
Expand Down
2 changes: 1 addition & 1 deletion lib/broker/index.js
Expand Up @@ -57,7 +57,7 @@ class Broker {
* @param {String} subject
* @param {Array} funcList
* @param {Object} opt
* @return {Promise<void>}
* @return void
*/
subscribe(subject, funcList, opt = {}) {
if (this.transporter) {
Expand Down
1 change: 1 addition & 0 deletions lib/context/index.js
Expand Up @@ -36,6 +36,7 @@ class Context {
* @param subject
* @param body
* @param opt
* @return {Promise<*>}
*/
call(subject, body, opt = {}) {
return this.service.call(subject, body, {
Expand Down
4 changes: 3 additions & 1 deletion lib/service/index.js
Expand Up @@ -28,7 +28,7 @@ class Service {
* @param subject
* @param middleware
* @param func
* @return {Promise<void>}
* @return void
*/
subscribe(subject, middleware, func) {
const subjectWithPrefix = `${this.opt.name}.${subject}`
Expand All @@ -46,6 +46,7 @@ class Service {
* @param subject
* @param body
* @param opt
* @return void
*/
publish(subject, body, opt = {}) {
this.broker.publish(subject, body, {
Expand All @@ -59,6 +60,7 @@ class Service {
* @param subject
* @param body
* @param opt
* @return {Promise<*>}
*/
call(subject, body, opt = {}) {
return this.broker.call(subject, body, {
Expand Down
4 changes: 2 additions & 2 deletions lib/transporter/base.js
Expand Up @@ -54,7 +54,7 @@ class Transporter {
*
* @param {Context} ctx
* @param {Function|Array} func
* @return {Promise<void>}
* @return void
*/
async handleImcomingRequest(ctx, func) {
const done = () => {
Expand Down Expand Up @@ -131,7 +131,7 @@ class Transporter {
/**
* Local transporter doesn't need connect to anywhere
*
* @return {Promise<void>}
* @return void
*/
disconnect() {
// Do nothing
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "microsia",
"version": "0.0.6",
"version": "0.0.7",
"main": "broker.js",
"scripts": {
"lint": "eslint ./lib --fix",
Expand Down

0 comments on commit 35e8921

Please sign in to comment.