Documentation ¶
Overview ¶
Index ¶
- Constants
- func NewSubNegotiation(name, option, ack_option string) subNegotiation
- func NewTelnetOption(name string, option byte, send_yes byte, send_no byte, ack_yes, ack_no byte, ...) telnetOption
- 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 ¶
View Source
const ( COM_PORT_OPTION = "\x2c" BCOM_PORT_OPTION = 44 // TelnetOption and TelnetSubnegotiation states REQUESTED = "REQUESTED" ACTIVE = "ACTIVE" INACTIVE = "INACTIVE" REALLY_INACTIVE = "REALLY_INACTIVE" // Client to Access Server SET_BAUDRATE = "\x01" SET_DATASIZE = "\x02" SET_PARITY = "\x03" SET_STOPSIZE = "\x04" SET_CONTROL = "\x05" NOTIFY_LINESTATE = "\x06" NOTIFY_MODEMSTATE = "\x07" FLOWCONTROL_SUSPEND = "\x08" FLOWCONTROL_RESUME = "\x09" SET_LINESTATE_MASK = "\x0a" SET_MODEMSTATE_MASK = "\x0b" PURGE_DATA = "\x0c" SERVER_SET_BAUDRATE = "\x65" SERVER_SET_DATASIZE = "\x66" SERVER_SET_PARITY = "\x67" SERVER_SET_STOPSIZE = "\x68" SERVER_SET_CONTROL = "\x69" SERVER_NOTIFY_LINESTATE = "\x6a" SERVER_NOTIFY_MODEMSTATE = "\x6b" SERVER_FLOWCONTROL_SUSPEND = "\x6c" SERVER_FLOWCONTROL_RESUME = "\x6d" SERVER_SET_LINESTATE_MASK = "\x6e" SERVER_SET_MODEMSTATE_MASK = "\x6f" SERVER_PURGE_DATA = "\x70" )
View Source
const ( MNormal = iota IACSeen MNegotiate )
Variables ¶
This section is empty.
Functions ¶
func NewSubNegotiation ¶
func NewSubNegotiation(name, option, ack_option string) subNegotiation
Types ¶
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
func NewStreamer ¶
func NewStreamer(host string, port int, 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.