The Run function serves as a very simple supervisor: it will start all the
services provided to it and will run until the first of them finishes. Next
it will try to stop the remaining services or timeout if they take too long
type Service interface {
fmt.Stringer// Start a service that will run until completion or until the context is// canceled
Start(ctx context.Context) error
}
A service that runs in the background endlessly until the context is canceled
var (
GraphQLServer Service = simpleService{
// contains filtered or unexported fields
}
Indexer Service = simpleService{
// contains filtered or unexported fields
}
)