proto

package
Version: v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: AGPL-3.0-only Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSM

func NewJSM(upstreamAddrs string, connTimeout time.Duration) state.JSM

Types

type Conn

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

Encapsulates the connection (stream) with a client

func NewConn

func NewConn(conn net.Conn, clientReg *core.ClientReg, cmdProcessor core.CommandProcessor) *Conn

func (*Conn) String

func (c *Conn) String() string

func (*Conn) Tick

func (c *Conn) Tick()

type ConnState

type ConnState int
const (
	// Conn waiting for a command from the client
	WantCommand ConnState = iota

	// Conn ready to dispatch
	ReadyToProcess

	// Conn waiting for job data from the client
	WantData

	// Conn is sending a reservation job data to the client
	SendJob

	// Conn is sending a  response to the client
	SendWord

	// Conn is waiting for an available job reservation
	WaitReservation

	// Conn is discarding job data (due to an error)
	BitBucket

	// Conn is closing & cleaning up
	Close

	// Conn is discarding data until it gets to \r\n
	WantEndLine

	// The connection is cleaned up and shutdown
	Stopped
)

func (ConnState) String

func (i ConnState) String() string

type TcpServer

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

func NewTcpServer

func NewTcpServer(cfg *core.Config) *TcpServer

func (*TcpServer) Listen

func (srv *TcpServer) Listen() error

func (*TcpServer) Shutdown

func (srv *TcpServer) Shutdown()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL