services

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStorageService

func GetStorageService(
	ctx types.Context, name string) types.StorageService

GetStorageService returns the storage service specified by the given name; otherwise a nil value is returned if no such service exists.

func Init

func Init(ctx types.Context, config gofig.Config) error

Init initializes the types.

func StorageServices

func StorageServices(ctx types.Context) <-chan types.StorageService

StorageServices returns a channel on which all the storage services are received.

func TaskEnqueue added in v0.6.0

func TaskEnqueue(
	ctx types.Context,
	run types.TaskRunFunc,
	schema []byte) *types.Task

TaskEnqueue enqueues a task for execution.

func TaskInspect

func TaskInspect(ctx types.Context, taskID int) *types.Task

TaskInspect returns the task with the specified ID.

func TaskTrack

func TaskTrack(ctx types.Context) *types.Task

TaskTrack creates a new, trackable task.

func TaskWait

func TaskWait(ctx types.Context, taskID int)

TaskWait blocks until the specified task is completed.

func TaskWaitAll

func TaskWaitAll(ctx types.Context, taskIDs ...int)

TaskWaitAll blocks until all the specified task are complete.

func TaskWaitAllC

func TaskWaitAllC(ctx types.Context, taskIDs ...int) <-chan int

TaskWaitAllC returns a channel that is closed only when all the specified tasks are completed.

func TaskWaitC

func TaskWaitC(ctx types.Context, taskID int) <-chan int

TaskWaitC returns a channel that is closed only when the specified task is completed.

func Tasks

func Tasks(ctx types.Context) <-chan *types.Task

Tasks returns a channel on which all tasks are received.

Types

This section is empty.

Jump to

Keyboard shortcuts

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