INNER CODE UNIT · Go
main
zalando/skipper · doc.go:342
func main() {
log.Fatal(skipper.Run(skipper.Options{
Address: ":9090",
RoutesFile: "routes.eskip",
CustomPredicates: []routing.PredicateSpec{&randomSpec{}},
CustomFilters: []filters.Spec{&helloSpec{}}}))
}
A file containing the routes, routes.eskip:
random:
Random(.05) -> hello("fish?") -> "https://fish.example.org";
hello:
* -> hello("world") -> "https://www.example.org"
Start the custom router:
go run hello.go