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"
|
"github.com/mdiluz/rove/pkg/rove"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// NewRouter sets up the server mux
|
||||||
func NewRouter() (router *mux.Router) {
|
func NewRouter() (router *mux.Router) {
|
||||||
// Create a new router
|
|
||||||
router = mux.NewRouter().StrictSlash(true)
|
router = mux.NewRouter().StrictSlash(true)
|
||||||
|
|
||||||
// Set up the handlers
|
// Set up the handlers
|
||||||
|
|
|
@ -7,10 +7,12 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Connection is the container for a simple connection to the server
|
||||||
type Connection struct {
|
type Connection struct {
|
||||||
host string
|
host string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewConnection sets up a new connection to a server host
|
||||||
func NewConnection(host string) *Connection {
|
func NewConnection(host string) *Connection {
|
||||||
return &Connection{
|
return &Connection{
|
||||||
host: host,
|
host: host,
|
||||||
|
@ -22,6 +24,7 @@ type ServerStatus struct {
|
||||||
Ready bool `json:"ready"`
|
Ready bool `json:"ready"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Status returns the current status of the server
|
||||||
func (c *Connection) Status() (status ServerStatus, err error) {
|
func (c *Connection) Status() (status ServerStatus, err error) {
|
||||||
url := url.URL{
|
url := url.URL{
|
||||||
Scheme: "http",
|
Scheme: "http",
|
||||||
|
|
Loading…
Add table
Reference in a new issue