browsersync

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 7 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 struct {
	// contains filtered or unexported fields
}

Client stands between the socket and the hub and is one directional (write only)

type Hub

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

Hub is a client switch that broadcasts messages

func NewHub

func NewHub() *Hub

NewHub creates a new Hub

type Server

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

Server serves a REST route the client connects to receive sync messages

func NewServer

func NewServer(port int, l *logging.Logger) *Server

NewServer creates a new Server with the port provided

func (*Server) Start

func (s *Server) Start()

Start starts the server and lets the hub listen for clients

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the hub and the server gracefully

func (*Server) Sync

func (s *Server) Sync()

Sync sends a sync message to the clients

Jump to

Keyboard shortcuts

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