fallback

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

README

Fallback

How To

  1. Run the "remote" application (not managed by Goblin):

    cd example-plugins/fallback
    go run main.go
    
  2. In another terminal, run Goblin server with the example fallback routes:

    goblin server -r example-fallback-routes.json
    
  3. In another terminal, run the fallback application as a Goblin plugin:

    cd example-plugins/fallback
    go build -buildmode=plugin
    
    goblin run -p ./fallback.so -d fallback
    
  4. In another terminal, use curl with the Goblin subdomain:

    > curl fallback.goblin:8081
    I am running at 10.0.0.1:8081
    
  5. In the terminal from step 3, use Ctrl-C to stop the plugin

  6. Use the same curl command from step 4 to see how Goblin routes to the service running locally from main.go:

    > curl fallback.goblin:8081
    I am running at 0.0.0.0:8081
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL