// SetupEventStreamSession creates a HTTP server SDK session for communicating
// with that server to be used for EventStream APIs. If HTTP/2 is enabled the
// server/client will only attempt to use HTTP/2.
SetupEventStreamSession creates a HTTP server SDK session for communicating
with that server to be used for EventStream APIs. If HTTP/2 is enabled the
server/client will only attempt to use HTTP/2.
// SetupEventStreamSession creates a HTTP server SDK session for communicating // with that server to be used for EventStream APIs . If HTTP / 2 is enabled the // server / client will only attempt to use HTTP / 2 .
func SetupEventStreamSession(
	t *testing.T, handler http.Handler, h2 bool,
) (sess *session.Session, cleanupFn func(), err error) {
	server := httptest.NewUnstartedServer(handler)
	client := setupServer(server, h2)
	cleanupFn = func() {
		server.Close()
	}
	sess, err = session.NewSession(unit.Session.Config, &aws.Config{
		Endpoint:               &server.URL,
		DisableParamValidation: aws.Bool(true),
		HTTPClient:             client,
	})
	if err != nil {
		return nil, nil, err
	}
	return sess, cleanupFn, nil
}
func SetupEventStreamSession ( t * testing . T , handler http . Handler , h2 bool , ) ( sess * session . Session , cleanupFn func ( ) , err error ) { server := httptest . NewUnstartedServer ( handler ) client := setupServer ( server , h2 ) cleanupFn = func ( ) { server . Close ( ) } sess , err = session . NewSession ( unit . Session . Config , & aws . Config { Endpoint : & server . URL , DisableParamValidation : aws . Bool ( true ) , HTTPClient : client , } ) if err != nil { return nil , nil , err } return sess , cleanupFn , nil }
SetupEventStreamSession creates a HTTP server SDK session for communicating
with that server to be used for EventStream APIs.
SetupEventStreamSession creates a HTTP server SDK session for communicating with that server to be used for EventStream APIs .
//		LogLevel:               aws.LogLevel(aws.LogDebugWithEventStreamBody),