client

package
v0.0.0-...-571808a Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandshakeTimeout time.Duration = time.Second * 2

Functions

func Subscribe

func Subscribe[T any](ctx context.Context, protocol, host, path string, callback OnMessageCallback[T])

Types

type Meta

type Meta[T any] struct {
	Created int64  `json:"created"`
	Updated int64  `json:"updated"`
	Index   string `json:"index"`
	Data    T      `json:"data"`
}

type OnMessageCallback

type OnMessageCallback[T any] func([]Meta[T])

Jump to

Keyboard shortcuts

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