Listener -
grpc
: Listener
Represents server listener where one or more services can be registered. so that ballerina program can offer service through this listener.
Constructor
__init
(int port, ListenerConfiguration? config)
- port int
-
Listener port
- config ListenerConfiguration? <ballerina/grpc:ListenerConfiguration?> ()
-
The
grpc:ListenerConfiguration
of the endpoint
Methods
LifeCycle Methods
Methods
error? result = listenerEp.__gracefulStop();
-
Return Type
(error?) An
error
if an error occurred during the listener stopping process or else()
error? result = listenerEp.__immediateStop();
-
Return Type
(error?) An
error
if an error occurs while stopping the server or else()
error? result = listenerEp.__detach(helloService);
Parameters
- s service
-
The service to be detached
-
Return Type
(error?) An
error
if occurred during detaching of a service or else()
LifeCycle Methods
error? result = listenerEp.__start();
-
Return Type
(error?) An
error
if an error occurs while starting the server or else()
error? result = listenerEp.__attach(helloService);
Parameters
- s service
-
The type of the service to be registered
- name string? (default <string?> ())
-
Name of the service
-
Return Type
(error?) An
error
if encounters an error while attaching the service or else()