0x1306e6d / tollgate

An API gateway for your microservice.
MIT License
6 stars 1 forks source link

Allow to configure `Server` fluently #123

Open 0x1306e6d opened 3 years ago

0x1306e6d commented 3 years ago

As #112, users can configure Server using configurator, but they should use a DSL way. Instead, some users may want to configure Server fluently, like:

Gateway.builder()
       .server().http(8080)
                .https(8443)
                .tlsSelfSigned()
                .then() // ???
       .upstream("/foo", Upstream.of("http://example.com")
       .build();

I could have done together in #112, but there was no proper naming for a method returning to GatewayBuilder. Here are my candidates: then, and, gateway, build, ...

TheWeaVer commented 3 years ago

Seems like build(), standby() and start() 😆