net

package
v0.28.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleMonitorRequest

func HandleMonitorRequest(w http.ResponseWriter, r *http.Request)

HandleMonitorRequest handles the monitor http request. events are emitted to the monitor event channel.

func NewSimuHub added in v0.21.0

func NewSimuHub(ctx context.Context, s *sim.Simulation) *ws.Hub

Types

type NDJSONScanner added in v0.24.0

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

NDJSONScanner scans a reader line by line and writes to the writer.

func NewNDJSONScanner added in v0.24.0

func NewNDJSONScanner(sleep time.Duration, repeat int) *NDJSONScanner

NewNDJSONScanner creates a new NDJSON scanner.

func (*NDJSONScanner) Scan added in v0.24.0

func (s *NDJSONScanner) Scan(r io.Reader, w io.Writer) error

Scan scans a reader line by line and writes to the writer.

func (*NDJSONScanner) ScanFile added in v0.24.0

func (s *NDJSONScanner) ScanFile(path string, w io.Writer) error

ScanFile scans a file line by line and writes to the writer.

type Server

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

func NewHTTPServer

func NewHTTPServer() *Server

func (Server) Address

func (s Server) Address() string

func (*Server) Restart

func (s *Server) Restart(ctx context.Context, addr string) error

func (*Server) Router

func (s *Server) Router() chi.Router

func (*Server) Start

func (s *Server) Start(addr string) error

func (*Server) Stop added in v0.8.0

func (s *Server) Stop()

Directories

Path Synopsis
Olink Adapter for Simulation
Olink Adapter for Simulation

Jump to

Keyboard shortcuts

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