clients

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientTypeWebSocket = "websocket"
	ClientTypeQuic      = "quic"
)

constant for reference to web socket of client

Variables

View Source
var ErrorWrongClientType = errors.New("wrong Client Type")

ErrorWrongClientType is Wrong Client Type Error

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Init() error
	Uninit()
	// async mode
	Send(message model.Message) error
	Receive() (model.Message, error)

	// notify auth info
	Notify(authInfo map[string]string)
}

Adapter is a web socket client interface

func GetClient

func GetClient(clientType string, config *config.EdgeHubConfig) (Adapter, error)

GetClient returns an Adapter object with new web socket

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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