budhttp

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 12 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)
	Publish(topic string, data []byte) error
	Open(name string) (fs.File, error)
}

func Load

func Load(log log.Interface, addr string) (Client, error)

Load a client from an address

func Try

func Try(log log.Interface, addr string) (Client, error)

Try tries loading a dev client from an environment variable or returns an empty client if no environment variable is set

type Event

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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