operatorsvr

package
v0.0.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: BSD-3-Clause Imports: 20 Imported by: 0

README

Operator Server

Listens for and handles connections from Operators

Documentation

Overview

Package operatorsvr - Listen for and handle operator connections

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Dir string
	SL  *slog.Logger
	FW  *flexiwriter.Writer
	SM  *jpersist.Manager[state.State]
	// contains filtered or unexported fields
}

Server listens for and handles operators. Populate its public fields and call Start to start it.

func (*Server) Start

func (s *Server) Start() error

Start starts the server servig.

func (*Server) Stop

func (s *Server) Stop(message string) error

Stop stops the server. It returns nil if it stopped nicely. If a message is provided, it will be sent to connected clients.

func (*Server) Wait

func (s *Server) Wait() error

Wait waits for the server to stop. It returns nil if it stopped nicely.

Jump to

Keyboard shortcuts

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