Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure callback for “Macro apps” #1073

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

eugeneia
Copy link
Member

@eugeneia eugeneia commented Nov 17, 2016

This new configure callback (as used in #1068) allows the creation of transparent “macro apps”, which are not instantiated, but instead modify the configuration they are configured on:

— Method myapp:configure configuration, name, arg

Optional. If this method is defined the new method is ignored and not
required, and when myapp is configured using config.app this method is
called instead of instantiating myapp using new. The configure method is
called with the configuration, name, and arg given to config.app, and
is intended to be used to add arbitrary apps and links to configuration using
config.app and config.link.

@eugeneia eugeneia added the rfc label Nov 17, 2016
@wingo
Copy link
Contributor

wingo commented Nov 17, 2016

Excellent idea! The docs should probably note that this is a class method, not a method on an instance, and that it's meant to add to configuration and not have other side effects.

dpino added a commit to dpino/snabb that referenced this pull request Jun 4, 2018
Init TTL and hop_limit in Echo response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants