alias config namespace

you can define some alias in different types like hook_url. and then use it on every where that accept this type with alias_name property.

sample code:

"alias": {
    "app_hook": {
        "type": "hook_url",
        "url": "http://app.com/hook",
        "headers": {
            "auth_token": "436gbg45b4by54c45c4"
        }
    },
    "app_redis": {
        "type": "redis",
        "channel": "action",
        "response_channel": "res_action"
    }
},

properties

nametyperequiredDescription
typestringYestype of alias

types

every type of alias has different properties

hook_url
nametyperequiredDescription
urlstringYEScan be a url like http://sample.com/hook. used for 'hook_url' type
methodstringNOcan be a request method like 'get' or 'post'. used for 'hook_url' type
headersstring[]NOheaders that can be set on hook request. used for 'hook_url' type
redis
nametyperequiredDescription
channelstringYESpublish channel name. used for 'redis' type
response_channelstringYESsubscribe channel name. used for 'redis' type
redis_instancestringNOa redis instance name. used for 'redis' type. (default is first instance defined on configs)