async

package
v1.6.5-rc54 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 22 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(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(mgrDB sqlx.DBExecutor, kv *kvdb.RedisDB, tasks *confmq.Config, redis *confredis.Redis) *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