Skip to content

Portgas-D-Asce/ConnectionPool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connection Pool

A simple general concurrency singleton connection pool.

support redis and mysql

redis

based on hiredis

mysql

dependence

necessary

usage

find_package(connection_pool 1.0.0 QUIET)
if (NOT connection_pool_FOUND)
    include(FetchContent)
    fetchcontent_declare(connection_pool
        GIT_REPOSITORY https://github.com/Portgas-D-Asce/ConnectionPool.git
        GIT_TAG v1.0.0-alpha
    )
    fetchcontent_makeavailable(connection_pool)
    # 拉取失败
    if(NOT connection_pool_POPULATED)
        message(FATAL_ERROR "fetch connection_pool failed!")
    endif ()
endif ()

target_link_libraries(exec
    PUBLIC
    $<$<BOOL:${connection_pool_FOUND}>:connection_pool::>redis_pool
    # $<$<BOOL:${connection_pool_FOUND}>:connection_pool::>mysql_pool
)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published