entrypoint

package
v0.0.0-...-cb1a7a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultErrorExitCode = -1
	DefaultResultsPath   = "/tekton/results"
)

Variables

This section is empty.

Functions

func ImageEntrypoint

func ImageEntrypoint(img string, command []string, args []string) (*model.Entrypoint, error)

This follows Kubernetes conventions documented at https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes. A defined command is considered an override for both the image entrypoint and command. More specifically, a defined command would not interact with the image entrypoint as described by https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact.

Types

type Config

type Config struct {
	DefaultTimeout time.Duration
	MetadataAPIURL *url.URL
	SecureLogging  bool
}

func NewConfig

func NewConfig() *Config

type Entrypointer

type Entrypointer struct {
	// Entrypoint is the original specified entrypoint, if any.
	Entrypoint string
	// Args are the original specified args, if any.
	Args []string

	// Runner encapsulates running commands.
	Runner Runner
}

func (Entrypointer) Go

func (e Entrypointer) Go() error

type RealRunner

type RealRunner struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*RealRunner) Run

func (rr *RealRunner) Run(args ...string) error

FIXME Determine how to handle, log, and report on errors Many errors that might occur should not necessarily abort the basic command processing Logging these errors should potentially not occur either, as it adds internal information Logging command outputs should default more cleanly to the standard streams

type Runner

type Runner interface {
	Run(args ...string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL