web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer added in v0.0.2

func NewServer(options ServerOptions) *server

Types

type ServerConfigError added in v0.0.3

type ServerConfigError interface {
	error
	KubeconfigDefaultLocation() string
	KubeconfigMissing() bool
	BootstrapMissing() bool
}

type ServerOptions added in v0.0.3

type ServerOptions struct {
	Host       string
	Port       int32
	Kubeconfig string
}

type WsClient added in v0.0.2

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

func NewWsClient added in v0.0.2

func NewWsClient(hub *WsHub, w http.ResponseWriter, r *http.Request) (*WsClient, error)

func (*WsClient) HandleReads added in v0.0.2

func (c *WsClient) HandleReads()

func (*WsClient) HandleWrites added in v0.0.2

func (c *WsClient) HandleWrites()

HandleWrites writes messages from the hub to the websocket connection.

A goroutine running writePump is started for each connection. The application ensures that there is at most one writer to a connection by executing all writes from this goroutine.

type WsHub added in v0.0.2

type WsHub struct {
	// Inbound messages from the clients.
	Broadcast chan []byte

	// Register requests from the clients.
	Register chan *WsClient

	// Unregister requests from clients.
	Unregister chan *WsClient
	// contains filtered or unexported fields
}

WsHub maintains the set of active clients and broadcasts messages to the clients.

func NewHub added in v0.0.2

func NewHub() *WsHub

NewHub creates new WsHub

func (*WsHub) Run added in v0.0.2

func (h *WsHub) Run()

Run handles communication operations with WsHub

Directories

Path Synopsis
components

Jump to

Keyboard shortcuts

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