Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents an active SSM port forwarding session. It provides access to the local port that is being forwarded to the remote host.
func NewPortForwardingSession ¶
func NewPortForwardingSession(ctx context.Context, pfi ssmclient.PortForwardingInput) (*Session, error)
NewPortForwardingSession starts a new SSM port forwarding session based on the provided input parameters. The underlying forwarding call runs in a goroutine so the caller is not blocked. Note that the tunnel will be ready to accept connections when NewPortForwardingSession returns. If LocalPort is not specified in the input, a free local port will be automatically allocated and used for the session. The caller can retrieve the local port being used via the LocalPort method.
The session can be closed by canceling the supplied context.