conn

package
v0.0.0-...-5801c3e Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAgent

func RegisterAgent() bool

func SaveConfig

func SaveConfig()

SaveConfig saves config file if it exists

Types

type Config

type Config struct {
	UUID   string
	ApiKey string
	Url    string
}

func GetConfig

func GetConfig() *Config

GetConfig gives config file

type Connection

type Connection struct {
	Out chan []byte
	In  chan []byte

	// reader/writer notifies main of error through ErrorChannel
	ErrorChannel chan struct{}
	// contains filtered or unexported fields
}

Connection encapsulates websocket conn and related stuff

func NewConnection

func NewConnection(ctx context.Context, ErrorChannel chan struct{}) *Connection

func (*Connection) Close

func (c *Connection) Close()

func (*Connection) Run

func (c *Connection) Run()

func (*Connection) Worker

func (c *Connection) Worker()

Worker coroutine, it recives packet, decodes it and runs functions commandbuff bashed on command type

Jump to

Keyboard shortcuts

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