Code Monkey home page Code Monkey logo

pwt's Introduction

pwt ("port wait") is a commandline utility that blocks until a tcp socket, aka port becomes available. Designed to replace the bash sleep command in your CI/CD scripts, this process will exit with 0 once the socket connects, or -1 in the event of a timeout.

Circleci Builds Github Workflows Github Issues Github Activity
CodeClimate Maintainability CodeClimate Test Coverage Go Version License Version

What's New

v0.1.7

  • -h -v flags for cli
  • bumped to go 1.20

Up and running

Homebrew

brew tap simonmittag/cli &&
  brew install pwt &&
  pwt 

Golang

git clone https://github.com/simonmittag/pwt && cd pwt && 
go install github.com/simonmittag/pwt/cmd/pwt && 
pwt 

Usage

λ pwt[v0.1.7]
Usage: pwt [-v]|[-w n] host[:port]
  -h    print usage instructions
  -v    print pwt version
  -w int
        time wait in seconds (default 10)

Examples

Wait for ipv4 localhost on default port

λ pwt 127.0.0.1
  pwt waiting for 127.0.0.1:80 .......... aborted after 10 seconds  

Wait for ipv6 localhost on port 8080 for 3 seconds

λ pwt -w 3 [::1]:8080
  pwt waiting for [::1]:8080 .. connected in 2 seconds

Wait for google on port 443

λ pwt -w 60 google.com:443
  pwt waiting for google.com:443 connected in <1 second  

Contributions

The pwt team welcomes all contributors. Everyone interacting with the project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct

pwt's People

Contributors

simonmittag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pwt's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.