io

package
v0.0.0-...-9247e29 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package io is the websocket package. This currently runs with the api but might end up moving to it's own api depending on performance and/or community preference.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory maintains the set of active clients

func New

func New() *Factory

New initializes the socket factory

func (*Factory) Register

func (f *Factory) Register(k8Client k8sv1.Clienter, w http.ResponseWriter, r *http.Request)

Register handles websocket requests from the peer.

func (*Factory) Run

func (f *Factory) Run()

Run starts the socket factory to handle client connections This function is available via NewFactory since Run() should only be called when the api starts.

type SocketFactory

type SocketFactory interface {
	// Run starts the websocket
	Run()
	// Register registers the new connection with the factory
	Register(k8Client k8sv1.Clienter, w http.ResponseWriter, r *http.Request)
}

SocketFactory interfaces Factory to run websockets

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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