browser

package
v0.17.10 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package browser provides the ability to send WebP images to a browser over websockets.

Index

Constants

View Source
const (
	TidbytAPIPush = "https://api.tidbyt.com/v0/devices/%s/push"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser

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

Browser provides a structure for serving WebP images over websockets to a web browser.

func NewBrowser

func NewBrowser(addr string, title string, watch bool, updateChan chan loader.Update, l *loader.Loader) (*Browser, error)

NewBrowser sets up a browser structure. Call Run() to kick off the main loops.

func (*Browser) Run

func (b *Browser) Run() error

Run starts the server process and runs forever in a blocking fashion. The main routines include an update watcher to process incomming changes to the webp and running the http handlers.

type TidbytPushJSON added in v0.17.7

type TidbytPushJSON struct {
	DeviceID       string `json:"deviceID"`
	Image          string `json:"image"`
	InstallationID string `json:"installationID"`
	Background     bool   `json:"background"`
}

Jump to

Keyboard shortcuts

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