worker

package
Version: v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	// Error is error
	Error string `json:"error,omitempty"`

	// Result is execution result
	Result interface{} `json:"result,omitempty"`
}

Response is worker function call result

func NewErrorResponse

func NewErrorResponse(err error) Response

NewErrorResponse returns a new response with error

func NewResponse

func NewResponse(result interface{}, err error) Response

NewResponse is Response constructor

func (Response) JSON

func (r Response) JSON() string

JSON returns value as JSON string

Source Files

Jump to

Keyboard shortcuts

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