scheduler

package
v0.0.0-...-6efc50b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	eh.Command

	// ExecuteAt returns the time when the command will execute.
	ExecuteAt() time.Time
}

Command is a scheduled command with an execution time.

func CommandWithExecuteTime

func CommandWithExecuteTime(cmd eh.Command, t time.Time) Command

CommandWithExecuteTime returns a wrapped command with a execution time set.

type CommandHandler

type CommandHandler struct {
	eh.CommandHandler
	// contains filtered or unexported fields
}

CommandHandler handles commands either directly or with a delay on a schedule.

func NewCommandHandler

func NewCommandHandler(handler eh.CommandHandler) *CommandHandler

NewCommandHandler creates a CommandHandler.

func (*CommandHandler) Error

func (b *CommandHandler) Error() <-chan error

Error returns the error channel.

func (*CommandHandler) HandleCommand

func (b *CommandHandler) HandleCommand(ctx context.Context, cmd eh.Command) error

HandleCommand implements the HandleCommand method of the eventhorizon.CommandHandler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL