telnetsrv

package
v2.28.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server - the telnet server struct

func New

func New(serverConfiguration *structs.TelnetServerConfiguration, globalTelnetConfigs *structs.GlobalTelnetServerConfiguration, sharedConnectionCounter *uint32, maxConnections uint32, closeConnectionChannel *chan struct{}, collector *collector.Collector, timelineManager *stats.TimelineManager, telnetHandler TelnetDataHandler) (*Server, error)

New - creates a new telnet server

func (*Server) DenyNewConnections

func (server *Server) DenyNewConnections(deny bool)

DenyNewConnections - deny new connections

func (*Server) GetName

func (server *Server) GetName() string

GetName - returns the server's name

func (*Server) Listen

func (server *Server) Listen() error

Listen - starts to listen and to handle the incoming messages

func (*Server) Shutdown

func (server *Server) Shutdown() error

Shutdown - stops listening

type TelnetDataHandler

type TelnetDataHandler interface {

	// Handle - handles the data and send
	Handle(line, ip string) bool

	// GetSourceType - returns the source type
	GetSourceType() *constants.SourceType

	// GetLogger - returns the logger
	GetLogger() *logh.ContextualLogger

	// GetValidationService - returns the validation service instance
	GetValidationService() *validation.Service

	// SilenceLogs - checks the configuration to silence all validation logs
	SilenceLogs() bool
}

TelnetDataHandler - handles the data from the telnet interface

Jump to

Keyboard shortcuts

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