Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // wlogrus associated with the postgres db PsqlType = "postgres-db" MAX_BATCH_QUEUE = 300 MAX_EPOCH_BATCH_QUEUE = 1 )
Static postgres queries, for each modification in the tables, the table needs to be reseted
Functions ¶
This section is empty.
Types ¶
type PostgresDBService ¶
type PostgresDBService struct { WriteChan chan pgx.Batch FinishSignalChan chan struct{} // contains filtered or unexported fields }
func ConnectToDB ¶
func ConnectToDB(ctx context.Context, url string, chanLength int, workerNum int) (*PostgresDBService, error)
Connect to the PostgreSQL Database and get the multithread-proof connection from the given url-composed credentials
func (*PostgresDBService) Close ¶
func (p *PostgresDBService) Close()
Close the connection with the PostgreSQL
func (*PostgresDBService) DoneTasks ¶
func (p *PostgresDBService) DoneTasks()
func (PostgresDBService) ExecuteBatch ¶
func (p PostgresDBService) ExecuteBatch(batch pgx.Batch) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.