Skip to content

Modules

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

Modules "building blocks" that integrate with Disgo by implementing the interface IService located in the disgo_commons repository.

IService

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

Clone this wiki locally