async

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskNameApiCall   = "apiCall"
	TaskNameApiResult = "apiResult"
)

Variables

This section is empty.

Functions

func ConvHttpResponse added in v1.5.9

func ConvHttpResponse(reqHeader http.Header, resp *http.Response) (*apitypes.HttpResponse, error)

func NewApiCallTask

func NewApiCallTask(prj *models.Project, chainCli *wasm.ChainClient, data []byte) (*asynq.Task, error)

Types

type ApiCallProcessor

type ApiCallProcessor struct {
	// contains filtered or unexported fields
}

func NewApiCallProcessor

func NewApiCallProcessor(l log.Logger, router *gin.Engine, cli *asynq.Client) *ApiCallProcessor

func (*ApiCallProcessor) ProcessTask

func (p *ApiCallProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error

type ApiResultProcessor

type ApiResultProcessor struct {
	// contains filtered or unexported fields
}

func NewApiResultProcessor

func NewApiResultProcessor(l log.Logger, mgrDB sqlx.DBExecutor, kv *kvdb.RedisDB, tasks *confmq.Config) *ApiResultProcessor

func (*ApiResultProcessor) ProcessTask

func (p *ApiResultProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error

Jump to

Keyboard shortcuts

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