Documentation ¶
Overview ¶
config package implement configuration retrieval for the session package.
Index ¶
Constants ¶
View Source
const ( SessionServiceName = "MessageGatewayService" DotDelimiter = "." ServiceName = "ssmmessages" HttpsPrefix = "https://" WebSocketPrefix = "wss://" ControlChannel = "control-channel" DataChannel = "data-channel" StreamQueryParameter = "stream" RoleQueryParameter = "role" APIVersion = "v1" RolePublishSubscribe = "publish_subscribe" RoleSubscribe = "subscribe" MessageSchemaVersion = "1.0" RetryAttempt = 5 DefaultTransmissionTimeout = 200 * time.Millisecond DefaultRoundTripTime = 100 * time.Millisecond DefaultRoundTripTimeVariation = 0 ResendSleepInterval = 100 * time.Millisecond WebSocketPingInterval = 54 * time.Second //ping interval need to be less than pong wait timeout to for detection WebSocketPongWaitTimeout = 60 * time.Second // Buffer capacity of 100000 items with each buffer item of 1024 bytes leads to max usage of 100MB (100000 * 1024 bytes = 100MB) of instance memory. // When changing StreamDataPayloadSize, make corresponding change to buffer capacity to ensure no more than 100MB of instance memory is used. StreamDataPayloadSize = 1024 OutgoingMessageBufferCapacity = 100000 IncomingMessageBufferCapacity = 100000 // ControlChannelWriteBufferSizeLimit represents 142000 bytes is the maximum control channel can send in 1 message ControlChannelWriteBufferSizeLimit = 142000 // Round trip time constant RTTConstant = 1.0 / 8.0 // Round trip time variation constant RTTVConstant = 1.0 / 4.0 ClockGranularity = 10 * time.Millisecond MaxTransmissionTimeout = 1 * time.Second RetryGeometricRatio = 2 RetryJitterRatio = 0.5 ControlChannelNumMaxRetries = -1 //forever retries for control channel ControlChannelRetryInitialDelayMillis = 5000 ControlChannelRetryMaxIntervalMillis = 1000 * 60 * 40 // 40 mins DataChannelNumMaxAttempts = 5 DataChannelRetryInitialDelayMillis = 100 DataChannelRetryMaxIntervalMillis = 5000 // MGS Errors SessionAlreadyTerminatedError = "Session is already terminated" IpcFileName = "ipcTempFile" ExecOutputFileName = "output" LogFileExtension = ".log" ScreenBufferSize = 30000 Exit = "exit" // ResumeReadExitCode indicates to resume reading from established connection. ResumeReadExitCode = -1 // LocalPortForwarding is one of types supported by port plugin and is used to differentiate handling of error // with scenario of sshd server port forwarding. LocalPortForwarding = "LocalPortForwarding" CloudWatchEncryptionErrorMsg = "" /* 192-byte string literal not displayed */ UnsupportedPowerShellVersionForStreamingErrorMsg = "" /* 177-byte string literal not displayed */ PowerShellTranscriptLoggingEnabledErrorMsg = "" /* 179-byte string literal not displayed */ S3EncryptionErrorMsg = "" /* 180-byte string literal not displayed */ )
Variables ¶
View Source
var GetMgsEndpoint = func(context context.T, region string) string { appConfig := context.AppConfig() if appConfig.Mgs.Endpoint != "" { fullUrl, err := url.Parse(appConfig.Mgs.Endpoint) if err == nil { if fullUrl.Host != "" { return fullUrl.Host } return fullUrl.Path } } endpointHelper := endpoint.NewEndpointHelper(context.Log(), appConfig) mgsEndpoint := endpointHelper.GetServiceEndpoint(ServiceName, region) return mgsEndpoint }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.