def make_config_parser(*args, **kwargs): parser = platform.make_config_parser(*args, **kwargs) parser.add_argument("--bind-host", action="store", default="localhost", help="Host to bind to.") parser.add_argument("--bind-port", action="store", default=8765, type=int, help="Port to bind to.") parser.add_argument("--redis-host", action="store", default="localhost", help="Redis host to connect to.") parser.add_argument("--redis-port", action="store", default=6379, type=int, help="Redis port to connect to.") parser.add_argument("--statsd-host", action="store", default="localhost", help="statsd host to connect to.") parser.add_argument("--statsd-port", action="store", default=8125, type=int, help="statsd port to connect to.") return parser
def main(): parser = platform.make_config_parser() parser.add_argument("credentials", help="Credentials to mint.") parser.add_argument("--token-expiry", help="When to expire credentials. NOTE: Credentials " "cannot be revoked without generating a new minting " "key pair!", type=int, default=100) args = parser.parse_args() platform.Application(args).once(do_mint, args.credentials, args.token_expiry)
def make_config_parser(*args, **kwargs): parser = platform.make_config_parser(*args, **kwargs) parser.add_argument("--connect-uri", action="store", default="ws://localhost:8081/socket", help="Address to connect to.") return parser