pipe

package
v2.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToPipe

func ConnectToPipe(pipePath string, handler HandlerFunc) error

func DialUnixPipe added in v2.7.0

func DialUnixPipe(pipePath string) (net.Conn, error)

func ErrIsEOF added in v2.7.0

func ErrIsEOF(err error) bool

func NewUnixPipeListener added in v2.7.0

func NewUnixPipeListener(pipePath string) (net.Listener, error)

Types

type Conn added in v2.7.0

type Conn struct {
	MsgChan chan []byte
	// contains filtered or unexported fields
}

func (Conn) ReadMessage added in v2.7.0

func (pc Conn) ReadMessage() ([]byte, bool)

func (Conn) Write added in v2.7.0

func (pc Conn) Write(b []byte) (int, error)

func (Conn) WriteMessage added in v2.7.0

func (pc Conn) WriteMessage(message string) error

type HandlerFunc added in v2.7.0

type HandlerFunc func(conn *Conn) error

type PipeServer

type PipeServer struct {
	Logger logger.Logger
	// contains filtered or unexported fields
}

func NewPipeServer

func NewPipeServer(pipePath string) (*PipeServer, error)

func (*PipeServer) Listen

func (srv *PipeServer) Listen(handler HandlerFunc) error

func (*PipeServer) Start added in v2.7.0

func (srv *PipeServer) Start(handler HandlerFunc)

func (*PipeServer) Stop added in v2.7.0

func (srv *PipeServer) Stop() error

Jump to

Keyboard shortcuts

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