websocket

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package websocket is a tiny websocket client purpose-built for load-testing. It does not have any special features other than strictly what is needed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	EventChannel chan *model.WebSocketEvent
	// contains filtered or unexported fields
}

Client is the websocket client to perform all actions.

func NewClient4

func NewClient4(param *ClientParams) (*Client, error)

NewClient4 constructs a new WebSocket client.

func (*Client) Close

func (c *Client) Close()

Close closes the client.

func (*Client) GetStatuses

func (c *Client) GetStatuses() error

func (*Client) GetStatusesByIds

func (c *Client) GetStatusesByIds(userIds []string) error

func (*Client) SendBinaryMessage added in v1.5.0

func (c *Client) SendBinaryMessage(action string, data map[string]interface{}) error

SendBinaryMessage is the method to write to the websocket using binary data type (MessagePack encoded).

func (*Client) SendMessage

func (c *Client) SendMessage(action string, data map[string]interface{}) error

SendMessage is the method to write to the websocket.

func (*Client) UpdateActiveChannel added in v1.15.0

func (c *Client) UpdateActiveChannel(channelId string) error

func (*Client) UpdateActiveTeam added in v1.15.0

func (c *Client) UpdateActiveTeam(teamId string) error

func (*Client) UpdateActiveThread added in v1.15.0

func (c *Client) UpdateActiveThread(channelId string, threadView bool) error

func (*Client) UserTyping

func (c *Client) UserTyping(channelId, parentId string) error

type ClientParams added in v1.5.0

type ClientParams struct {
	WsURL          string
	AuthToken      string
	ConnID         string
	ServerSequence int64
}

Jump to

Keyboard shortcuts

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