Skip to content

Modules

Christopher McGregor edited this page Feb 14, 2018 · 35 revisions

Modules "building blocks" that integrate with Disgo implement the interface IService located in the [disgo_commons](https://github.com/dispatchlabs/disgo_commons repository.

IService

type IService interface {
    Name() string
    IsRunning() bool
    Register(listener *net.Listener)
    Go(waitGroup *sync.WaitGroup)
}
  • Name() returns the name of the service
  • IsRunning() returns if the service is still running
  • Register(listener *net.Listener) allows for the service to register GRPC server on an existing listening port
  • Go(waitGroup *sync.WaitGroup) the main entry point of the service

Clone this wiki locally