Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Port string `json:"port" default:"8080"`
TLSPort string `json:"tlsPort" default:"6443"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Host string `json:"host,omitempty"`
LogLevel string `json:"logLevel,omitempty"`
// Version is used as command line flag to print version
Version bool `json:"version,omitempty" flagUsage:"show the version of the app without starting"`
}
Config is the main server configuration.
func (*Config) Load ¶
Load loads the config using multiconfig from json or environment or command line args but does not fatal as MustLoad does.
type Connection ¶
type Message ¶
type Message struct {
FromUUID string `json:"fromUUID,omitempty"`
Type string `json:"type"`
Body json.RawMessage `json:"body,omitempty"`
Request json.RawMessage `json:"request,omitempty"`
}
func NewMessage ¶
func ParseMessage ¶
func (*Message) WriteTo ¶
func (m *Message) WriteTo(s interfaces.MelodyWriter) error
type Node ¶
type Node struct {
UUID string `json:"uuid,omitempty"`
Connected_ bool `json:"connected,omitempty"`
Build build.Data `json:"build,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
// Devices Devices `json:"devices,omitempty"`
Config json.RawMessage `json:"config,omitempty"`
Aliases map[devices.ID]string `json:"aliases,omitempty"`
sync.Mutex
}
func (*Node) SetConnected ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.