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

Provide a way to configure the HTTP Listener configurations in the Async API generated listeners #7493

Open
TharmiganK opened this issue Jan 8, 2025 · 0 comments

Comments

@TharmiganK
Copy link
Contributor

Current Limitation

The listeners created from Async API has the following init function:

function init(ListenerConfig listenerConfig , int|http:Listener listenOn) {}

The ListenerConfig record only has the trigger specific configurations, and if you want to configure the HTTP listener config then you need to pass the HTTP listener as the listenOn parameter(this requires a HTTP listener defintion). There is no way to simply give the port for listenOn and add the HTTP configurations separately.

Suggested Improvement

In case of GraphQL listener, we can pass the HTTP listener configurations as part of GraphQL listener configurations:

isolated function init(int|http:Listener listenTo, *ListenerConfiguration configuration) { }
# Provides a set of configurations for configure the underlying HTTP listener of the GraphQL listener.
public type ListenerConfiguration record {|
    *http:ListenerConfiguration;
|};

This approach is more preferable than the other

Version

Ballerina SwanLake Update 11

@TharmiganK TharmiganK changed the title Provide a way to configure the HTTP Listener configurations in the Aync API generated listeners Provide a way to configure the HTTP Listener configurations in the Async API generated listeners Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant