Skip to content
gozixPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

GoZix Echo

License Documentation

Release Build Status Go Report Card Code Coverage

The bundle provide a Echo integration to GoZix application.

Installation

go get github.com/gozix/echo/v4

Dependencies

Configuration 3 or more servers

{
  "echo": {
    "admin": {
      "host": "0.0.0.0",
      "port": 8080,
      "level": "debug",
      "debug": false,
      "hide_banner": true,
      "hide_port": false 
    }, 
    "public": {
      "host": "0.0.0.0",
      "port": 8081,
      "static": {
        "prefix": "/",
        "root": ""
      },
      "level": "info",
      "debug": false,
      "hide_banner": true,
      "hide_port": false 
    },
    "private": {
      "port": 8082,
      "...": "..."
    },
    "...": {}
  }
}

Without server names the http-server command runs all servers from the echo config section:

gzEcho.NewBundle()

With server names the command runs only these servers and fails if any of them is not configured:

gzEcho.NewBundle("admin", "public", "private")

To get a server echo instance outside the http-server command, use the factory:

func NewRoutesCommand(f *gzEcho.Factory) *cobra.Command {
	// ...
	var e, err = f.Echo("admin")
	// ...
}

Documentation

You can find documentation on pkg.go.dev and read source code if needed.

Questions

If you have any questions, feel free to create an issue.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages