Documentation
¶
Index ¶
- Constants
- Variables
- func BuildContainerfile(p BuildContainerfileParams) (string, error)
- func ExtractTsuruAppFilesFromAppSourceContext(ctx context.Context, r io.Reader) (*pb.TsuruConfig, error)
- func ExtractTsuruAppFilesFromContainerImageTarball(ctx context.Context, r io.Reader, workingDir string) (*pb.TsuruConfig, error)
- func GetRegistry(image string) string
- func IsProcfile(filename string) bool
- func IsTsuruYaml(filename string) bool
- func SortExposedPorts(ports map[string]struct{}) []string
- type BuildContainerfileParams
- type BuildResponseOutputWriter
- type Builder
- type ProcfileCandidates
- type Server
- type TsuruYamlCandidates
- type TsuruYamlData
- type TsuruYamlHealthcheck
- type TsuruYamlHooks
- type TsuruYamlKubernetesConfig
- type TsuruYamlKubernetesGroup
- type TsuruYamlKubernetesProcessConfig
- type TsuruYamlKubernetesProcessPortConfig
- type TsuruYamlProcess
- type TsuruYamlRestartHooks
- type TsuruYamlStartupcheck
Constants ¶
View Source
const ( DefaultTsuruPlatformWorkingDir = "/home/application/current" ProcfileName = "Procfile" )
Variables ¶
View Source
var ( TsuruYamlNames = []string{"tsuru.yml", "tsuru.yaml", "app.yml", "app.yaml"} TsuruConfigDirs = []string{DefaultTsuruPlatformWorkingDir, "/app/user", "/"} )
Functions ¶
func BuildContainerfile ¶
func BuildContainerfile(p BuildContainerfileParams) (string, error)
func GetRegistry ¶
func IsProcfile ¶
func IsTsuruYaml ¶
func SortExposedPorts ¶
Types ¶
type BuildResponseOutputWriter ¶
type BuildResponseOutputWriter struct {
// contains filtered or unexported fields
}
func (*BuildResponseOutputWriter) Close ¶
func (w *BuildResponseOutputWriter) Close() error
func (*BuildResponseOutputWriter) Fd ¶
func (w *BuildResponseOutputWriter) Fd() uintptr
func (*BuildResponseOutputWriter) Name ¶
func (w *BuildResponseOutputWriter) Name() string
type Builder ¶
type Builder interface {
Build(ctx context.Context, r *pb.BuildRequest, w io.Writer) (*pb.TsuruConfig, error)
}
type ProcfileCandidates ¶
func (ProcfileCandidates) Pick ¶
func (c ProcfileCandidates) Pick(workingDir string) string
type Server ¶
type Server struct {
pb.UnimplementedBuildServer
// contains filtered or unexported fields
}
func (*Server) Build ¶
func (s *Server) Build(req *pb.BuildRequest, stream pb.Build_BuildServer) error
type TsuruYamlCandidates ¶
func (TsuruYamlCandidates) Pick ¶
func (c TsuruYamlCandidates) Pick(workingDir string) string
type TsuruYamlData ¶
type TsuruYamlData struct {
Hooks *TsuruYamlHooks `json:"hooks,omitempty" bson:",omitempty"`
Healthcheck *TsuruYamlHealthcheck `json:"healthcheck,omitempty" bson:",omitempty"`
Startupcheck *TsuruYamlStartupcheck `json:"startupcheck,omitempty" bson:",omitempty"`
Kubernetes *TsuruYamlKubernetesConfig `json:"kubernetes,omitempty" bson:",omitempty"`
Processes []TsuruYamlProcess `json:"processes,omitempty" bson:",omitempty"`
}
type TsuruYamlHealthcheck ¶
type TsuruYamlHealthcheck struct {
Headers map[string]string `json:"headers,omitempty" bson:",omitempty"`
Path string `json:"path"`
Scheme string `json:"scheme"`
Command []string `json:"command,omitempty" bson:",omitempty"`
AllowedFailures int `json:"allowed_failures,omitempty" yaml:"allowed_failures" bson:"allowed_failures,omitempty"`
IntervalSeconds int `json:"interval_seconds,omitempty" yaml:"interval_seconds" bson:"interval_seconds,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty" yaml:"timeout_seconds" bson:"timeout_seconds,omitempty"`
DeployTimeoutSeconds int `json:"deploy_timeout_seconds,omitempty" yaml:"deploy_timeout_seconds" bson:"deploy_timeout_seconds,omitempty"`
ForceRestart bool `json:"force_restart,omitempty" yaml:"force_restart" bson:"force_restart,omitempty"`
}
type TsuruYamlHooks ¶
type TsuruYamlHooks struct {
Restart TsuruYamlRestartHooks `json:"restart" bson:",omitempty"`
Build []string `json:"build" bson:",omitempty"`
}
type TsuruYamlKubernetesConfig ¶
type TsuruYamlKubernetesConfig struct {
Groups map[string]TsuruYamlKubernetesGroup `json:"groups,omitempty"`
}
func (*TsuruYamlKubernetesConfig) DeepCopy ¶
func (in *TsuruYamlKubernetesConfig) DeepCopy() *TsuruYamlKubernetesConfig
func (*TsuruYamlKubernetesConfig) DeepCopyInto ¶
func (in *TsuruYamlKubernetesConfig) DeepCopyInto(out *TsuruYamlKubernetesConfig)
type TsuruYamlKubernetesGroup ¶
type TsuruYamlKubernetesGroup map[string]TsuruYamlKubernetesProcessConfig
type TsuruYamlKubernetesProcessConfig ¶
type TsuruYamlKubernetesProcessConfig struct {
Ports []TsuruYamlKubernetesProcessPortConfig `json:"ports"`
}
type TsuruYamlProcess ¶
type TsuruYamlProcess struct {
Healthcheck *TsuruYamlHealthcheck `json:"healthcheck,omitempty" bson:",omitempty"`
Startupcheck *TsuruYamlStartupcheck `json:"startupcheck,omitempty" bson:",omitempty"`
Name string `json:"name"`
Command string `json:"command" yaml:"command" bson:"command"`
}
type TsuruYamlRestartHooks ¶
type TsuruYamlStartupcheck ¶
type TsuruYamlStartupcheck struct {
Headers map[string]string `json:"headers,omitempty" bson:",omitempty"`
Path string `json:"path"`
Scheme string `json:"scheme"`
Command []string `json:"command,omitempty" bson:",omitempty"`
AllowedFailures int `json:"allowed_failures,omitempty" yaml:"allowed_failures" bson:"allowed_failures,omitempty"`
IntervalSeconds int `json:"interval_seconds,omitempty" yaml:"interval_seconds" bson:"interval_seconds,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty" yaml:"timeout_seconds" bson:"timeout_seconds,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.