There was an error while loading. Please reload this page.
Modules "building blocks" that integrate with Disgo are called services that implement the interface IService located in the disgo_commons repo.
// IService type IService interface { IsRunning() bool Go(waitGroup *sync.WaitGroup) }
The following is a shell implementation of the DAPoS service:
package core import ( "sync" log "github.com/sirupsen/logrus" ) // DAPoSService type DAPoSService struct { running bool } // NewDAPoSService func NewDAPoSService() *DAPoSService { return &DAPoSService{ running: false, } } // IsRunning func (daposService *DAPoSService) IsRunning() bool { return daposService.running } // Go func (daposService *DAPoSService) Go(waitGroup *sync.WaitGroup) { daposService.running = true }