budclient

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Render(route string, props interface{}) (*ssr.Response, error)
	Proxy(w http.ResponseWriter, r *http.Request)
	Publish(topic string, data []byte) error
}

func Load

func Load(addr string) (Client, error)

Load a client from an address

func Try

func Try(addr string) (Client, error)

LoadFromEnv tries loading a dev client from an environment variable

type Event

type Event struct {
	Topic string `json:"topic,omitempty"`
	Data  []byte `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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