Update comments
This commit is contained in:
parent
6f9d400d8b
commit
5d250edb6b
2 changed files with 4 additions and 1 deletions
|
@ -8,8 +8,8 @@ import (
|
|||
"github.com/mdiluz/rove/pkg/rove"
|
||||
)
|
||||
|
||||
// NewRouter sets up the server mux
|
||||
func NewRouter() (router *mux.Router) {
|
||||
// Create a new router
|
||||
router = mux.NewRouter().StrictSlash(true)
|
||||
|
||||
// Set up the handlers
|
||||
|
|
|
@ -7,10 +7,12 @@ import (
|
|||
"net/url"
|
||||
)
|
||||
|
||||
// Connection is the container for a simple connection to the server
|
||||
type Connection struct {
|
||||
host string
|
||||
}
|
||||
|
||||
// NewConnection sets up a new connection to a server host
|
||||
func NewConnection(host string) *Connection {
|
||||
return &Connection{
|
||||
host: host,
|
||||
|
@ -22,6 +24,7 @@ type ServerStatus struct {
|
|||
Ready bool `json:"ready"`
|
||||
}
|
||||
|
||||
// Status returns the current status of the server
|
||||
func (c *Connection) Status() (status ServerStatus, err error) {
|
||||
url := url.URL{
|
||||
Scheme: "http",
|
||||
|
|
Loading…
Add table
Reference in a new issue