Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlockHeightParam string = "BlockHeight" TimeoutParam string = "Timeout" )
Constants are commonly used by all the tasks through kwargs.
Variables ¶
This section is empty.
Functions ¶
func GetDuration ¶
GetDuration parses key parameter to time.Duration type
func ParseBlockHeight ¶
ParseBlockHeight parses blockHeight interface param to uint64
Types ¶
type Bootstrapper ¶
type Bootstrapper struct {
// contains filtered or unexported fields
}
Bootstrapper implements bootstrap.Bootstrapper.
func (*Bootstrapper) Bootstrap ¶
func (b *Bootstrapper) Bootstrap(context map[string]interface{}) error
Bootstrap initiates the queue.
type Config ¶
type Config interface { // GetNumWorkers gets the number of background workers to initiate GetNumWorkers() int // GetWorkerWaitTime gets the worker wait time for a task to be available while polling // increasing this may slow down task execution while reducing it may consume a lot of CPU cycles GetWorkerWaitTimeMS() int }
Config is an interface for queue specific configurations
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the queue server currently implemented based on gocelery
func (*Server) EnqueueJob ¶
func (qs *Server) EnqueueJob(taskTypeName string, params map[string]interface{}) (TaskResult, error)
EnqueueJob enqueues a job on the queue server for the given taskTypeName
func (*Server) RegisterTaskType ¶
RegisterTaskType registers a task type on the queue server
type TaskResult ¶
type TaskResult interface { // Get the result within a timeout from the queue task execution Get(timeout time.Duration) (interface{}, error) }
TaskResult represents a result from a queued task execution
Click to show internal directories.
Click to hide internal directories.