websocketclient

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricMessageChan = "wsp_message_channel_size"
)

Variables

View Source
var MessageChanLabel = []string{"url"}

Functions

This section is empty.

Types

type Client

type Client struct {
	URL *url.URL
	// contains filtered or unexported fields
}

func New

func New(addr string) (*Client, error)

func (*Client) Recv

func (c *Client) Recv(ctx context.Context, messageCh chan<- Message)

func (*Client) Stop

func (c *Client) Stop()

type Message

type Message struct {
	Type        int
	Body        []byte
	ReceiveTime time.Time
}

Jump to

Keyboard shortcuts

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