telnet

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: 13 Imported by: 0

Documentation

Overview

Package telnet implements telnet transport at very basic level.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Streamer

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

func NewStreamer

func NewStreamer(host string, credentials credentials.Credentials, opts ...StreamerOption) *Streamer

func (*Streamer) Close

func (m *Streamer) Close()

func (*Streamer) Cmd

func (*Streamer) Download

func (m *Streamer) Download(paths []string, recurse bool) (map[string]streamer.File, error)

func (*Streamer) GetCredentials

func (m *Streamer) GetCredentials() credentials.Credentials

func (Streamer) HasFeature

func (m Streamer) HasFeature(feature streamer.Const) bool

func (*Streamer) Init

func (m *Streamer) Init(ctx context.Context) error

func (*Streamer) InitAgentForward

func (m *Streamer) InitAgentForward() error

func (*Streamer) Read

func (m *Streamer) Read(context.Context, int) ([]byte, error)

func (*Streamer) ReadTo

func (m *Streamer) ReadTo(ctx context.Context, expr expr.Expr) (streamer.ReadRes, error)

func (*Streamer) SetCredentialsInterceptor

func (m *Streamer) SetCredentialsInterceptor(inter func(credentials.Credentials) credentials.Credentials)

func (*Streamer) SetReadTimeout

func (m *Streamer) SetReadTimeout(duration time.Duration) time.Duration

func (*Streamer) SetTrace

func (m *Streamer) SetTrace(cb trace.CB)

func (*Streamer) Upload

func (m *Streamer) Upload(m2 map[string]streamer.File) error

func (*Streamer) Write

func (m *Streamer) Write(text []byte) error

type StreamerOption

type StreamerOption func(*Streamer)

func WithLogger

func WithLogger(log *zap.Logger) StreamerOption

func WithTrace

func WithTrace(trace trace.CB) StreamerOption

Jump to

Keyboard shortcuts

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