Listener - grpc : Listener

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

Methods

__gracefulStop

()

returns error

  • Return Type

    (error)

__immediateStop

()

returns error

Stops the registered service.

  • Return Type

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

__detach

(service s)

returns error

Parameters

  • s service
  • Return Type

    (error)

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.

__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 (default ())
  • Name of the service.

  • Return Type

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