Files
via/configuration.go
Jeff Winkler 351bed3ea1 Chatroom 2 (#10)
* Remove unused method. Don't panic if unknown room.

* Need a Connected() check for rooms publishing - don't do the work of rendering for a dead connection

* Make vars private.

* Linter issues

* Remove Connected()

* Mutation observer. Publish 4x / second.

---------

Co-authored-by: João Gonçalves <joao.goncalves01@gmail.com>
2025-11-13 14:39:37 -01:00

34 lines
794 B
Go

package via
type LogLevel int
const (
undefined LogLevel = iota
LogLevelError
LogLevelWarn
LogLevelInfo
LogLevelDebug
)
// Plugin is a func that can mutate the given *via.V app runtime. It is useful to integrate popular JS/CSS UI libraries or tools.
type Plugin func(v *V)
// Options defines configuration options for the via application
type Options struct {
// The development mode flag. If true, enables server and browser auto-reload on `.go` file changes.
DevMode bool
// The http server address. e.g. ':3000'
ServerAddress string
// Level of the logs to write to stdout.
// Options: Error, Warn, Info, Debug.
LogLvl LogLevel
// The title of the HTML document.
DocumentTitle string
// Plugins to extend the capabilities of the `Via` application.
Plugins []Plugin
}