func (prod *SimpleProducer) Streams() []MessageStreamID {
	return prod.streams
}
Streams returns the routers this producer is listening to.
package core
import (
	"fmt"
	"sync"
	"time"
	"github.com/sirupsen/logrus"
	"github.com/trivago/tgo"
	"github.com/trivago/tgo/thealthcheck"
)
type SimpleProducer struct {
	id              string
	control         chan PluginControl
	runState        *PluginRunState
	streams         []MessageStreamID `config:"Streams"`
	modulators      ModulatorArray    `config:"Modulators"`
	fallbackStream  Router            `config:"FallbackStream" default:""`
	shutdownTimeout time.Duration     `config:"ShutdownTimeoutMs" default:"1000" metric:"ms"`
	onRoll          func()
	onPrepareStop   func()
	onStop          func()
	Logger          logrus.FieldLogger
}
func (prod *SimpleProducer) Configure(conf PluginConfigReader) {
	prod.id = conf.GetID()
	prod.Logger = conf.GetLogger()
	prod.runState = NewPluginRunState()
	prod.control = make(chan PluginControl, 1)
	prod.AddHealthCheckAt("/pluginState", func() (code int, body string) {
		if prod.IsActive() {
			return thealthcheck.StatusOK,
				fmt.Sprintf("ACTIVE: %s", prod.runState.GetStateString())
		}
		return thealthcheck.StatusServiceUnavailable,
			fmt.Sprintf("NOT_ACTIVE: %s", prod.runState.GetStateString())
	})
}
func (prod *SimpleProducer) GetLogger() logrus.FieldLogger {
	return prod.Logger
}
func (prod *SimpleProducer) AddHealthCheck(callback thealthcheck.CallbackFunc) {
	prod.AddHealthCheckAt("", callback)
}
func (prod *SimpleProducer) AddHealthCheckAt(path string, callback thealthcheck.CallbackFunc) {
	thealthcheck.AddEndpoint("/"+prod.GetID()+path, callback)
}
func (prod *SimpleProducer) GetID() string {
	return prod.id
}