server

package
v0.0.0-...-8fb0621 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRouter

func GetRouter(workflowController *WorkflowController) *chi.Mux

func ReturnURLS

func ReturnURLS() urls

Types

type Broker

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

A single Broker will be created in this program. It is responsible for keeping a list of which clients (browsers) are currently attached and broadcasting events (messages) to those clients.

func (*Broker) ServeHTTP

func (b *Broker) ServeHTTP(w http.ResponseWriter, r *http.Request)

This Broker method handles and HTTP request at the "/events/" URL.

func (*Broker) Start

func (b *Broker) Start()

This Broker method starts a new goroutine. It handles the addition & removal of clients, as well as the broadcasting of messages out to clients that are currently attached.

type WorkflowController

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

func NewWorkflowController

func NewWorkflowController(clientGandalf *goclient.ClientGandalf, b *Broker) *WorkflowController

func (WorkflowController) Index

func (WorkflowController) SendCommand

func (fc WorkflowController) SendCommand(w http.ResponseWriter, r *http.Request)

func (WorkflowController) SendUpdate

func (fc WorkflowController) SendUpdate(w http.ResponseWriter, r *http.Request)

type WorkflowServer

type WorkflowServer struct {
	Rooturl string
	Url     urls
	// contains filtered or unexported fields
}

func NewWorkflowServer

func NewWorkflowServer(clientGandalf *goclient.ClientGandalf) *WorkflowServer

func (WorkflowServer) Run

func (f WorkflowServer) Run()

Jump to

Keyboard shortcuts

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