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 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 TsuruYamlRestartHooks
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 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"` Kubernetes *TsuruYamlKubernetesConfig `json:"kubernetes,omitempty" bson:",omitempty"` }
type TsuruYamlHealthcheck ¶
type TsuruYamlHealthcheck struct { Headers map[string]string `json:"headers,omitempty" bson:",omitempty"` Path string `json:"path"` Method string `json:"method"` Scheme string `json:"scheme"` Match string `json:"match,omitempty" bson:",omitempty"` RouterBody string `json:"router_body,omitempty" yaml:"router_body" bson:"router_body,omitempty"` Command []string `json:"command,omitempty" bson:",omitempty"` Status int `json:"status"` 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"` UseInRouter bool `json:"use_in_router,omitempty" yaml:"use_in_router" bson:"use_in_router,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 TsuruYamlRestartHooks ¶
Click to show internal directories.
Click to hide internal directories.