scclient

package
v0.0.0-...-18e44d2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ConnectionOptions gowebsocket.ConnectionOptions
	RequestHeader     http.Header
	Listener
	// contains filtered or unexported fields
}

func New

func New(url string) Client

func (*Client) Connect

func (client *Client) Connect()

func (*Client) Disconnect

func (client *Client) Disconnect()

func (*Client) Emit

func (client *Client) Emit(eventName string, data interface{})

func (*Client) EmitAck

func (client *Client) EmitAck(eventName string, data interface{}, ack func(eventName string, error interface{}, data interface{}))

func (*Client) EnableLogging

func (client *Client) EnableLogging()

func (*Client) GetAuthToken

func (client *Client) GetAuthToken() string

func (*Client) GetLogger

func (client *Client) GetLogger() logging.Logger

func (*Client) IsConnected

func (client *Client) IsConnected() bool

func (*Client) On

func (client *Client) On(eventName string, ack func(eventName string, data interface{}))

func (*Client) OnAck

func (client *Client) OnAck(eventName string, ack func(eventName string, data interface{}, ack func(error interface{}, data interface{})))

func (*Client) OnChannel

func (client *Client) OnChannel(eventName string, ack func(eventName string, data interface{}))

func (*Client) Publish

func (client *Client) Publish(channelName string, data interface{})

func (*Client) PublishAck

func (client *Client) PublishAck(channelName string, data interface{}, ack func(eventName string, error interface{}, data interface{}))

func (*Client) SetAuthToken

func (client *Client) SetAuthToken(token string)

func (*Client) SetAuthenticationListener

func (client *Client) SetAuthenticationListener(onSetAuthentication func(client Client, token string), onAuthentication func(client Client, isAuthenticated bool))

func (*Client) SetBasicListener

func (client *Client) SetBasicListener(onConnect func(client Client), onConnectError func(client Client, err error), onDisconnect func(client Client, err error))

func (*Client) Subscribe

func (client *Client) Subscribe(channelName string)

func (*Client) SubscribeAck

func (client *Client) SubscribeAck(channelName string, ack func(eventName string, error interface{}, data interface{}))

func (*Client) Unsubscribe

func (client *Client) Unsubscribe(channelName string)

func (*Client) UnsubscribeAck

func (client *Client) UnsubscribeAck(channelName string, ack func(eventName string, error interface{}, data interface{}))

type Empty

type Empty struct{}

type Listener

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

func Init

func Init() Listener

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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