github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/modules/vm/wasmapi/handler/handler.go (about) 1 package handler 2 3 import ( 4 "github.com/hibiken/asynq" 5 6 confid "github.com/machinefi/w3bstream/pkg/depends/conf/id" 7 "github.com/machinefi/w3bstream/pkg/depends/kit/sqlx" 8 optypes "github.com/machinefi/w3bstream/pkg/modules/operator/pool/types" 9 "github.com/machinefi/w3bstream/pkg/types" 10 ) 11 12 type Handler struct { 13 opPool optypes.Pool 14 mgrDB sqlx.DBExecutor 15 chainConf *types.ChainConfig 16 sfid confid.SFIDGenerator 17 asyncCli *asynq.Client 18 risc0Conf *types.Risc0Config 19 } 20 21 func New(mgrDB sqlx.DBExecutor, chainConf *types.ChainConfig, opPool optypes.Pool, sfid confid.SFIDGenerator, 22 asyncCli *asynq.Client, risc0Conf *types.Risc0Config) *Handler { 23 return &Handler{ 24 opPool: opPool, 25 mgrDB: mgrDB, 26 chainConf: chainConf, 27 sfid: sfid, 28 asyncCli: asyncCli, 29 risc0Conf: risc0Conf, 30 } 31 }