agent/acs/handler/acs_handler.go
func (acsSession *session) startSessionOnce() error {
	acsEndpoint, err := acsSession.ecsClient.DiscoverPollEndpoint(acsSession.containerInstanceARN)
	if err != nil {
		seelog.Errorf("acs: unable to discover poll endpoint, err: %v", err)
		return err
	}

	url := acsWsURL(acsEndpoint, acsSession.agentConfig.Cluster, acsSession.containerInstanceARN, acsSession.taskEngine, acsSession.resources)
	client := acsSession.resources.createACSClient(url, acsSession.agentConfig)
	defer client.Close()

	return acsSession.startACSSession(client)
}
func (acsSession *session) startSessionOnce() error {
	acsEndpoint, err := acsSession.ecsClient.DiscoverPollEndpoint(acsSession.containerInstanceARN)
	if err != nil {
		seelog.Errorf("acs: unable to discover poll endpoint, err: %v", err)
		return err
	}

	url := acsWsURL(acsEndpoint, acsSession.agentConfig.Cluster, acsSession.containerInstanceARN, acsSession.taskEngine, acsSession.resources)
	client := acsSession.resources.createACSClient(url, acsSession.agentConfig)
	defer client.Close()

	return acsSession.startACSSession(client)
}
func ( acsSession * session ) startSessionOnce ( ) error { acsEndpoint , err := acsSession . ecsClient . DiscoverPollEndpoint ( acsSession . containerInstanceARN ) if err != nil { seelog . Errorf ( " " , err ) return err } url := acsWsURL ( acsEndpoint , acsSession . agentConfig . Cluster , acsSession . containerInstanceARN , acsSession . taskEngine , acsSession . resources ) client := acsSession . resources . createACSClient ( url , acsSession . agentConfig ) defer client . Close ( ) return acsSession . startACSSession ( client ) }
// startSessionOnce creates a session with ACS and handles requests using the passed
// in arguments
startSessionOnce creates a session with ACS and handles requests using the passed in arguments