func (c Config) BuilderPodWaitDuration() time.Duration {
	return time.Duration(time.Duration(c.BuilderPodWaitDurationMSec) * time.Millisecond)
}
BuilderPodWaitDuration returns the maximum time to wait for the end
of the execution of a Pod building an application.
package gitreceive
import (
	"strings"
	"time"
)
const (
	builderPodTick    = 100
	objectStorageTick = 500
)
type Config struct {
	ControllerHost       string `envconfig:"DEIS_CONTROLLER_SERVICE_HOST" required:"true"`
	ControllerPort       string `envconfig:"DEIS_CONTROLLER_SERVICE_PORT" required:"true"`
	RegistryHost         string `envconfig:"DEIS_REGISTRY_SERVICE_HOST" required:"true"`
	RegistryPort         string `envconfig:"DEIS_REGISTRY_SERVICE_PORT" required:"true"`
	RegistryProxyPort    string `envconfig:"DEIS_REGISTRY_PROXY_PORT" default:"5555"`
	RegistryLocation     string `envconfig:"DEIS_REGISTRY_LOCATION" default:"on-cluster"`
	RegistrySecretPrefix string `envconfig:"DEIS_REGISTRY_SECRET_PREFIX" default:"private-registry"`
	GitHome                       string `envconfig:"GIT_HOME" required:"true"`
	SSHConnection                 string `envconfig:"SSH_CONNECTION" required:"true"`
	SSHOriginalCommand            string `envconfig:"SSH_ORIGINAL_COMMAND" required:"true"`
	Repository                    string `envconfig:"REPOSITORY" required:"true"`
	Username                      string `envconfig:"USERNAME" required:"true"`
	Fingerprint                   string `envconfig:"FINGERPRINT" required:"true"`
	PodNamespace                  string `envconfig:"POD_NAMESPACE" required:"true"`
	StorageRegion                 string `envconfig:"STORAGE_REGION" default:"us-east-1"`
	Debug                         bool   `envconfig:"DEIS_DEBUG" default:"false"`
	BuilderPodTickDurationMSec    int    `envconfig:"BUILDER_POD_TICK_DURATION" default:"100"`
	BuilderPodWaitDurationMSec    int    `envconfig:"BUILDER_POD_WAIT_DURATION" default:"900000"`  
	ObjectStorageTickDurationMSec int    `envconfig:"OBJECT_STORAGE_TICK_DURATION" default:"500"`
	ObjectStorageWaitDurationMSec int    `envconfig:"OBJECT_STORAGE_WAIT_DURATION" default:"300000"`  
	SessionIdleIntervalMsec       int    `envconfig:"SESSION_IDLE_INTERVAL" default:"10000"`          
	SlugBuilderImage              string `envconfig:"SLUGBUILDER_IMAGE_NAME" required:"true"`
	DockerBuilderImage            string `envconfig:"DOCKERBUILDER_IMAGE_NAME" required:"true"`
	SlugBuilderImagePullPolicy    string `envconfig:"SLUG_BUILDER_IMAGE_PULL_POLICY" default:"Always"`
	DockerBuilderImagePullPolicy  string `envconfig:"DOCKER_BUILDER_IMAGE_PULL_POLICY" default:"Always"`
	StorageType                   string `envconfig:"BUILDER_STORAGE" default:"minio"`
	BuilderPodNodeSelector        string `envconfig:"BUILDER_POD_NODE_SELECTOR" default:""`
}
func (c Config) App() string {
	li := strings.LastIndex(c.Repository, ".")
	if li == -1 {
		return c.Repository
	}
	return c.Repository[0:li]
}
func (c Config) BuilderPodTickDuration() time.Duration {
	return time.Duration(time.Duration(c.BuilderPodTickDurationMSec) * time.Millisecond)
}