mirror of
https://github.com/GrassrootsEconomics/cic-dw.git
synced 2024-11-01 07:26:46 +01:00
25 lines
559 B
Go
25 lines
559 B
Go
|
package syncer
|
||
|
|
||
|
import (
|
||
|
cic_net "github.com/grassrootseconomics/cic-go/net"
|
||
|
"github.com/hibiken/asynq"
|
||
|
"github.com/jackc/pgx/v4/pgxpool"
|
||
|
"github.com/nleof/goyesql"
|
||
|
)
|
||
|
|
||
|
type Syncer struct {
|
||
|
db *pgxpool.Pool
|
||
|
rClient asynq.RedisConnOpt
|
||
|
cicnetClient *cic_net.CicNet
|
||
|
queries goyesql.Queries
|
||
|
}
|
||
|
|
||
|
func New(db *pgxpool.Pool, rClient asynq.RedisConnOpt, cicnetClient *cic_net.CicNet, queries goyesql.Queries) *Syncer {
|
||
|
return &Syncer{
|
||
|
db: db,
|
||
|
rClient: rClient,
|
||
|
cicnetClient: cicnetClient,
|
||
|
queries: queries,
|
||
|
}
|
||
|
}
|