cable

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package cable connects to HEY's Action Cable server, so commands can be told when something changed instead of polling for it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(ctx context.Context, baseURL string, authMgr *auth.Manager, options ...actioncable.Option) (*actioncable.Client, error)

Dial connects to the cable server for a HEY base URL, authorizing the upgrade request with the same credentials the SDK sends on an API request.

The credentials are asked for again on every dial, not only the first: a client reconnects on its own for as long as `hey tui` or `hey watch` is running, which is longer than an access token lives, and a reconnect carrying the token the first dial used would be turned down for good while a working refresh token sat on disk.

func URL

func URL(baseURL string) (string, error)

URL is the cable endpoint for a base URL: https://app.hey.com becomes wss://app.hey.com/cable. HEY_CABLE_URL overrides it outright.

Types

This section is empty.

Jump to

Keyboard shortcuts

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