Listener - grpc : Listener

Represents server listener where one or more services can be registered. so that ballerina program can offer service through this listener.

LifeCycle Methods

__start

()

returns error?

Starts the registered service.

  • Return Type

    (error?)
  • Returns an error if encounters an error while starting the server, returns nil otherwise.

__stop

()

returns error?

Stops the registered service.

  • Return Type

    (error?)
  • Returns an error if encounters an error while stopping the server, returns nil otherwise.

__attach

(service s, string? name)

returns error?

Gets called every time a service attaches itself to this endpoint - also happens at module init time.

Parameters

  • s service
  • The type of the service to be registered.

  • name string? - ()
  • Name of the service.

  • Return Type

    (error?)
  • Returns an error if encounters an error while attaching the service, returns nil otherwise.