conn

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeOut = fmt.Errorf("connection Timeout")

ErrTimeOut linter

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection linter

func NewConnection

func NewConnection(id, nodeID, token, url string, params map[string]string) *Connection

NewConnection connecting to signal with give url, callback to handle internal data from signal

func (*Connection) Close

func (c *Connection) Close()

Close linter

func (*Connection) Debug

func (c *Connection) Debug(v ...interface{})

Debug linter

func (*Connection) DebugSpew

func (c *Connection) DebugSpew(v ...interface{})

DebugSpew linter

func (*Connection) Error

func (c *Connection) Error(v ...interface{})

Error linter

func (*Connection) GetParams

func (c *Connection) GetParams() map[string]string

GetParams linter

func (*Connection) GetRef

func (c *Connection) GetRef(topic *string) *string

GetRef return a ref

func (*Connection) Info

func (c *Connection) Info(v ...interface{})

Info linter

func (*Connection) Reading

func (c *Connection) Reading() chan *client.Message

Reading linter

func (*Connection) Reconnect

func (c *Connection) Reconnect(params map[string]string) error

Reconnect linter

func (*Connection) Send

func (c *Connection) Send(ref *string, msg *client.Message) chan interface{}

Send return a ref

func (*Connection) Start

func (c *Connection) Start(sub *Subscriber) error

Start linter

func (*Connection) Subscribe

func (c *Connection) Subscribe(sub *Subscriber) error

Subscribe linter

func (*Connection) UnSubscribe

func (c *Connection) UnSubscribe(topic string)

UnSubscribe linter

func (*Connection) Warn

func (c *Connection) Warn(v ...interface{})

Warn linter

type MsgSender

type MsgSender struct {
	// contains filtered or unexported fields
}

MsgSender linter

type Resp

type Resp struct {
	Reason string `json:"reason"`
}

Resp linter

type Result

type Result struct {
	Response *Resp  `json:"response"`
	Status   string `json:"status"`
}

Result linter

type Subscriber

type Subscriber struct {
	Topic        string // channel name
	NeedSendping bool   // need to sendping or not
	Chann        *client.Chan
}

Subscriber save all subcriber info

Jump to

Keyboard shortcuts

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