client

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVENT_IDENTITY       = "identity"
	EVENT_SUBSCRIBER_ACK = "subscriber_ack"
)
View Source
const (
	DEFAULT_ENVIRONMENT = "prod"
	DEFAULT_DOMAIN      = "localhost:3000"
	DEFAULT_LOG_LEVEL   = "error"
)

Variables

This section is empty.

Functions

func HandleEvents added in v0.1.3

func HandleEvents()

func HandleIncomingMessages

func HandleIncomingMessages(connection *websocket.Conn)

func HandleSendEvents

func HandleSendEvents(connection *websocket.Conn)

func HandleWebsocketClose

func HandleWebsocketClose(message ControllerMessage)

func InitClient

func InitClient() *websocket.Conn

func Main

func Main()

func ScanFile

func ScanFile()

func SendIdentity

func SendIdentity(connection *websocket.Conn, clientId string)

Types

type ClientOptions

type ClientOptions struct {
	Env          string
	Domain       *common.Domain
	LogLevel     zapcore.Level
	PeerId       string
	Listen       bool
	Output       bool
	UrlClipboard bool
}

func InitOptions

func InitOptions() *ClientOptions

type ControllerMessage

type ControllerMessage struct {
	Message    string
	Error      error
	Connection *websocket.Conn
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL