Skip to content

bubunyo/tcp_proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tcp_proxy

Proxy and remote services into you applicaton to be to test how your application reacts to network partitions of external/remote services.

Example Usage

import proxy "github.com/bubunyo/tcp_proxy"


func main(){
    // proxy a redis server running on port 6379 on localhost.
    p := proxy.New("localhost:6379") 

    // use the proxy's new address
    rdb := redis.NewClient(&redis.Options{Addr: p.Addr()})

    // test new connection
    err := rdb.Ping(context.Background()).Err()
    if err != nil {
        log.Panic("redis connection not established")
    }
}

Todo

  • Add tests.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages