Documentation ¶
Overview ¶
Package session starts the session.
Package session starts the session.
Index ¶
- Constants
- Variables
- func Register(session ISessionPlugin)
- func ValidateInputAndStartSession(args []string, out io.Writer)
- type ISession
- type ISessionPlugin
- type Session
- func (s *Session) Execute(log log.T) (err error)
- func (s *Session) GetResumeSessionParams(log log.T) (string, error)
- func (s *Session) OpenDataChannel(log log.T) (err error)
- func (s *Session) ProcessFirstMessage(log log.T, outputMessage message.ClientMessage) (isHandlerReady bool, err error)
- func (s *Session) ResumeSessionHandler(log log.T) (err error)
- func (s *Session) Stop()
- func (s *Session) TerminateSession(log log.T) error
Constants ¶
const ( LegacyArgumentLength = 4 ArgumentLength = 7 StartSessionOperation = "StartSession" VersionFile = "VERSION" )
Variables ¶
var SessionRegistry = map[string]ISessionPlugin{}
Functions ¶
func Register ¶
func Register(session ISessionPlugin)
func ValidateInputAndStartSession ¶
ValidateInputAndStartSession validates input sent from AWS CLI and starts a session if validation is successful. AWS CLI sends input in the order of args[0] will be path of executable (ignored) args[1] is session response args[2] is client region args[3] is operation name args[4] is profile name from aws credentials/config files args[5] is parameters input to aws cli for StartSession api args[6] is endpoint for ssm service
Types ¶
type ISessionPlugin ¶
type Session ¶
type Session struct { DataChannel datachannel.IDataChannel SessionId string StreamUrl string TokenValue string IsAwsCliUpgradeNeeded bool Endpoint string ClientId string TargetId string SessionType string SessionProperties interface{} DisplayMode sessionutil.DisplayMode // contains filtered or unexported fields }
func (*Session) GetResumeSessionParams ¶
GetResumeSessionParams calls ResumeSession API and gets tokenvalue for reconnecting
func (*Session) OpenDataChannel ¶
OpenDataChannel initializes datachannel
func (*Session) ProcessFirstMessage ¶
func (s *Session) ProcessFirstMessage(log log.T, outputMessage message.ClientMessage) (isHandlerReady bool, err error)
ProcessFirstMessage only processes messages with PayloadType Output to determine the sessionType of the session to be launched. This is a fallback for agent versions that do not support handshake, they immediately start sending shell output.
func (*Session) ResumeSessionHandler ¶
ResumeSessionHandler gets token value and tries to Reconnect to datachannel
Directories ¶
Path | Synopsis |
---|---|
Package portsession starts port session.
|
Package portsession starts port session. |
Package sessionutil contains utility methods required to start session.
|
Package sessionutil contains utility methods required to start session. |
Package shellsession starts shell session.
|
Package shellsession starts shell session. |