Skip to content

Commit

Permalink
a bit of comment
Browse files Browse the repository at this point in the history
  • Loading branch information
emicklei committed Jun 21, 2024
1 parent e5650b0 commit 3e51f89
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ func (s *service) init() {
s.indexTemplate = tmpl
}

// Options can be used to configure a Service on startup.
type Options struct {
HTTPPort int
ServeMux *http.ServeMux
// Uses 5656 as the default
HTTPPort int
// Uses http.DefaultServeMux as default
ServeMux *http.ServeMux
// Uses "/" as default
HTTPBasePath string
}

Expand Down Expand Up @@ -78,11 +82,13 @@ type service struct {
indexTemplate *template.Template
}

// Service is the HTTP service to explore one or more values (structures).
type Service interface {
// Start accepts 0 or 1 Options
Start(opts ...Options)
}

// NewService creates a new to explore one or more values (structures).
func NewService(labelValuePairs ...any) Service {
return &service{explorer: newExplorerOnAll(labelValuePairs...)}
}
Expand Down

0 comments on commit 3e51f89

Please sign in to comment.