func newRefreshCredentialsHandler(ctx context.Context, cluster string, containerInstanceArn string, acsClient wsclient.ClientServer, credentialsManager credentials.Manager, taskEngine engine.TaskEngine) refreshCredentialsHandler {
	// Create a cancelable context from the parent context
	derivedContext, cancel := context.WithCancel(ctx)
	return refreshCredentialsHandler{
		messageBuffer:      make(chan *ecsacs.IAMRoleCredentialsMessage),
		ackRequest:         make(chan *ecsacs.IAMRoleCredentialsAckRequest),
		ctx:                derivedContext,
		cancel:             cancel,
		cluster:            aws.String(cluster),
		containerInstance:  aws.String(containerInstanceArn),
		acsClient:          acsClient,
		credentialsManager: credentialsManager,
		taskEngine:         taskEngine,
	}
}
func newRefreshCredentialsHandler(ctx context.Context, cluster string, containerInstanceArn string, acsClient wsclient.ClientServer, credentialsManager credentials.Manager, taskEngine engine.TaskEngine) refreshCredentialsHandler {
	// Create a cancelable context from the parent context
	derivedContext, cancel := context.WithCancel(ctx)
	return refreshCredentialsHandler{
		messageBuffer:      make(chan *ecsacs.IAMRoleCredentialsMessage),
		ackRequest:         make(chan *ecsacs.IAMRoleCredentialsAckRequest),
		ctx:                derivedContext,
		cancel:             cancel,
		cluster:            aws.String(cluster),
		containerInstance:  aws.String(containerInstanceArn),
		acsClient:          acsClient,
		credentialsManager: credentialsManager,
		taskEngine:         taskEngine,
	}
}
// newRefreshCredentialsHandler returns a new refreshCredentialsHandler object