logstash

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TCPPROTOCOL variable constant for tcp
	TCPPROTOCOL = "tcp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Host          string
	Port          int
	Connection    *net.TCPConn
	TLSConnection *tls.Conn
	Timeout       int
}

Server struct to hold building of a server

func New

func New(host string, port, timeout int) *Server

New host name, port and timeout in seconds

func (*Server) Close

func (s *Server) Close()

Close close server connection

func (*Server) CloseTLS

func (s *Server) CloseTLS()

CloseTLS close TLS server connection

func (*Server) Connect

func (s *Server) Connect() (*net.TCPConn, error)

Connect create server connection

func (*Server) ConnectTLS

func (s *Server) ConnectTLS() (*tls.Conn, error)

ConnectTLS connect using TLS

func (*Server) Show

func (s *Server) Show()

Show host port and timeout

func (*Server) UpdateTLSTimeout

func (s *Server) UpdateTLSTimeout()

UpdateTLSTimeout increase time to continue work

func (*Server) UpdateTimeout

func (s *Server) UpdateTimeout()

UpdateTimeout increase time to continue work

func (*Server) Write

func (s *Server) Write(p []byte) (n int, err error)

Write out data on connection

func (*Server) WriteTLS

func (s *Server) WriteTLS(p []byte) (n int, err error)

WriteTLS write via TLS connection

Jump to

Keyboard shortcuts

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