controller

package
v0.0.0-...-d5c58d1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ChatAppEventSource  = "gabo1208.knative-go-chat-app/source"
	FirstUserConnection = "gabo1208.knative-go-chat-app.FirstUserConnection"
	UserReconnected     = "gabo1208.knative-go-chat-app.UserReconnected"
	NewUserConnected    = "gabo1208.knative-go-chat-app.NewUserConnected"
	UserDisconnected    = "gabo1208.knative-go-chat-app.UserDisconnected"
	MessageFromUser     = "gabo1208.knative-go-chat-app.MessageFromUser"
	GetUsers            = "gabo1208.knative-go-chat-app.GetUsers"
	ExternalUsers       = "gabo1208.knative-go-chat-app.ExternalUsers"
	GetConnectedUsers   = "gabo1208.knative-go-chat-app.GetConnectedUsers"
)

Variables

This section is empty.

Functions

func AppendUsernames

func AppendUsernames(ce *event.Event, manager *clientManager)

func GetUsernames

func GetUsernames(usernamesMap map[string]*client) []string

func SendCEViaHTTP

func SendCEViaHTTP(ce *cloudevents.Event, uri string)

Types

type Controller

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

func New

func New(root string) *Controller

func (*Controller) CeHandler

func (c *Controller) CeHandler(event cloudevents.Event)

func (*Controller) Mux

func (c *Controller) Mux() *http.ServeMux

func (*Controller) RootHandler

func (c *Controller) RootHandler(w http.ResponseWriter, r *http.Request)

func (*Controller) SetCEClient

func (c *Controller) SetCEClient(client ceclient.Client)

func (*Controller) WSHandler

func (c *Controller) WSHandler(ws *websocket.Conn)

Jump to

Keyboard shortcuts

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