agent/handlers/introspection_server_setup.go
func ServeIntrospectionHTTPEndpoint(containerInstanceArn *string, taskEngine engine.TaskEngine, cfg *config.Config) {
	// Is this the right level to type assert, assuming we'd abstract multiple taskengines here?
	// Revisit if we ever add another type..
	dockerTaskEngine := taskEngine.(*engine.DockerTaskEngine)

	server := introspectionServerSetup(containerInstanceArn, dockerTaskEngine, cfg)
	for {
		once := sync.Once{}
		retry.RetryWithBackoff(retry.NewExponentialBackoff(time.Second, time.Minute, 0.2, 2), func() error {
			// TODO, make this cancellable and use the passed in context; for
			// now, not critical if this gets interrupted
			err := server.ListenAndServe()
			once.Do(func() {
				seelog.Error("Error running http api", "err", err)
			})
			return err
		})
	}
}
func ServeIntrospectionHTTPEndpoint(containerInstanceArn *string, taskEngine engine.TaskEngine, cfg *config.Config) {
	// Is this the right level to type assert, assuming we'd abstract multiple taskengines here?
	// Revisit if we ever add another type..
	dockerTaskEngine := taskEngine.(*engine.DockerTaskEngine)

	server := introspectionServerSetup(containerInstanceArn, dockerTaskEngine, cfg)
	for {
		once := sync.Once{}
		retry.RetryWithBackoff(retry.NewExponentialBackoff(time.Second, time.Minute, 0.2, 2), func() error {
			// TODO, make this cancellable and use the passed in context; for
			// now, not critical if this gets interrupted
			err := server.ListenAndServe()
			once.Do(func() {
				seelog.Error("Error running http api", "err", err)
			})
			return err
		})
	}
}
func ServeIntrospectionHTTPEndpoint ( containerInstanceArn * string , taskEngine engine . TaskEngine , cfg * config . Config ) { // Is this the right level to type assert, assuming we'd abstract multiple taskengines here? // Revisit if we ever add another type.. dockerTaskEngine := taskEngine . ( * engine . DockerTaskEngine ) server := introspectionServerSetup ( containerInstanceArn , dockerTaskEngine , cfg ) for { once := sync . Once { } retry . RetryWithBackoff ( retry . NewExponentialBackoff ( time . Second , time . Minute , 0.2 , 2 ) , func ( ) error { // TODO, make this cancellable and use the passed in context; for // now, not critical if this gets interrupted err := server . ListenAndServe ( ) once . Do ( func ( ) { seelog . Error ( " " , " " , err ) } ) return err } ) } }
// ServeIntrospectionHTTPEndpoint serves information about this agent/containerInstance and tasks
// running on it. "V1" here indicates the hostname version of this server instead
// of the handler versions, i.e. "V1" server can include "V1" and "V2" handlers.
ServeIntrospectionHTTPEndpoint serves information about this agent / containerInstance and tasks running on it . V1 here indicates the hostname version of this server instead of the handler versions i . e . V1 server can include V1 and V2 handlers .