Skip to content

Support observer hooks #131

@h2non

Description

@h2non

Replace events in favor of observer hooks with control flow capabilities.

const client = resilient({})

client.observe('before request', function (ctx, next) {
 // logic goes here...  
})

client.observe('dialing', function (ctx, next) {
 // logic goes here...  
})

client.observe('retry', function (ctx, next) {
 // logic goes here...  
})

client.observe('response', function (ctx, next) {
 // logic goes here...  
})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions