Documentation ¶
Index ¶
- Constants
- func HandleIncomingMessages(connection *websocket.Conn)
- func HandleSendEvents(input chan string, connection *websocket.Conn)
- func HandleWebsocketClose(connection *websocket.Conn)
- func InitClient() *websocket.Conn
- func Main()
- func ScanFile(input chan string)
- func SendIdentity(connection *websocket.Conn, clientId string)
- type ClientOptions
- type IdentityMessage
- type LogMessage
- type Message
Constants ¶
View Source
const ( DEFAULT_ENVIRONMENT = "prod" DEFAULT_DOMAIN = "localhost:3000" DEFAULT_LOG_LEVEL = "error" )
Variables ¶
This section is empty.
Functions ¶
func HandleIncomingMessages ¶
Needed to receive server events Right now we do nothing, but its here to avoid errors on the protocol
func HandleSendEvents ¶
func HandleWebsocketClose ¶
func InitClient ¶
func SendIdentity ¶
Types ¶
type ClientOptions ¶
type ClientOptions struct { Env string Domain *utils.Domain LogLevel zapcore.Level PeerId string Listen bool }
func InitOptions ¶
func InitOptions() *ClientOptions
type IdentityMessage ¶
type LogMessage ¶
type LogMessage struct {
Line string `json:"line"`
}
type Message ¶
type Message struct { Id string `json:"id"` Payload interface{} `json:"payload"` Event string `json:"event"` }
func (Message) MarshalLogObject ¶
func (message Message) MarshalLogObject(encoder zapcore.ObjectEncoder) error
Click to show internal directories.
Click to hide internal directories.