gvendor

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Exec(client Client) error
}

type ActionClose

type ActionClose struct {
}

func Close

func Close() *ActionClose

func (ActionClose) Exec

func (a ActionClose) Exec(client Client) error

type ActionExpectLine

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

func ExpectLine

func ExpectLine(data string) *ActionExpectLine

func (ActionExpectLine) Exec

func (m ActionExpectLine) Exec(client Client) error

type ActionSend

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

func Send

func Send(data string) *ActionSend

func SendBytes

func SendBytes(data []byte, sleep time.Duration, perByteWrite bool) *ActionSend

func SendLine

func SendLine(data string) *ActionSend

func SendSleep

func SendSleep(data string, sleep time.Duration) *ActionSend

func (ActionSend) Exec

func (m ActionSend) Exec(client Client) error

func (ActionSend) String

func (m ActionSend) String() string

type Client

type Client interface {
	ReadTo(ctx context.Context, expr expr.Expr) (streamer.ReadRes, error)
	Write(text []byte) error
	Close() error
}

type Server

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

func New

func New(dialog []Action, opts ...ServerOption) (*Server, error)

func (*Server) GetAddress

func (m *Server) GetAddress() (string, int)

func (*Server) Run

func (m *Server) Run(ctx context.Context) error

type ServerOption

type ServerOption func(*Server)

func WithListener

func WithListener(listener net.Listener) ServerOption

func WithLogger

func WithLogger(logger *zap.Logger) ServerOption

func WithPassword

func WithPassword(password string) ServerOption

func WithPrivateKey

func WithPrivateKey(privateKey []byte) ServerOption

func WithUser

func WithUser(username string) ServerOption

Jump to

Keyboard shortcuts

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