Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorizeString ¶
ColorizeString colorizes a string with the given color and returns it
Types ¶
type ColorMachine ¶
type ColorMachine interface {
Get(key interface{}) int
}
ColorMachine provides the interface for a color picker.
type ConfigurationManager ¶
type CronEngine ¶
type CronEngine struct {
Cron Cron
}
CronEngine is an adapter for the robfig/cron library
func NewCronEngine ¶
func NewCronEngine() *CronEngine
NewCronEngine returns an initialized cron engine
func (*CronEngine) AddTask ¶
func (e *CronEngine) AddTask(task Task) error
AddTask adds a task to the job list
func (*CronEngine) Initialize ¶
func (e *CronEngine) Initialize(config ConfigurationManager)
Initialize reads tasks from config into internal structure
type RoundRobinColorMachine ¶
type RoundRobinColorMachine struct { AvailableColors []color.Attribute // contains filtered or unexported fields }
RoundRobinColorMachine keeps a set of colors and cycles through them when requested with Pluck()
func NewRoundRobinColorMachine ¶
func NewRoundRobinColorMachine() *RoundRobinColorMachine
NewRoundRobinColorMachine initialises a new round robin color machine
func (*RoundRobinColorMachine) Get ¶
func (m *RoundRobinColorMachine) Get(key interface{}) int
Get loads the color for a given key. It gets a new color from the list if the key is unknown. The color is then remembered for the key.
func (*RoundRobinColorMachine) Pluck ¶
func (m *RoundRobinColorMachine) Pluck() int
Pluck returns the first available color