Documentation ¶
Overview ¶
Package telnet implements telnet transport at very basic level.
Index ¶
- type Streamer
- func (m *Streamer) Close()
- func (m *Streamer) Cmd(context.Context, string) (gcmd.CmdRes, error)
- func (m *Streamer) Download(paths []string, recurse bool) (map[string]streamer.File, error)
- func (m *Streamer) GetCredentials() credentials.Credentials
- func (m Streamer) HasFeature(feature streamer.Const) bool
- func (m *Streamer) Init(ctx context.Context) error
- func (m *Streamer) InitAgentForward() error
- func (m *Streamer) Read(context.Context, int) ([]byte, error)
- func (m *Streamer) ReadTo(ctx context.Context, expr expr.Expr) (streamer.ReadRes, error)
- func (m *Streamer) SetCredentialsInterceptor(inter func(credentials.Credentials) credentials.Credentials)
- func (m *Streamer) SetReadTimeout(duration time.Duration) time.Duration
- func (m *Streamer) SetTrace(cb trace.CB)
- func (m *Streamer) Upload(m2 map[string]streamer.File) error
- func (m *Streamer) Write(text []byte) error
- type StreamerOption
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) GetCredentials ¶
func (m *Streamer) GetCredentials() credentials.Credentials
func (*Streamer) InitAgentForward ¶
func (*Streamer) SetCredentialsInterceptor ¶
func (m *Streamer) SetCredentialsInterceptor(inter func(credentials.Credentials) credentials.Credentials)
func (*Streamer) SetReadTimeout ¶
type StreamerOption ¶
type StreamerOption func(*Streamer)
func WithLogger ¶
func WithLogger(log *zap.Logger) StreamerOption
func WithTrace ¶
func WithTrace(trace trace.CB) StreamerOption
Click to show internal directories.
Click to hide internal directories.