Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertRunnerProject(runnerProj *runnerv1.Project) (*project.Project, error)
- func IsShell(lang string) bool
- func IsShellLanguage(languageID string) bool
- func IsSupported(lang string) bool
- func NewRunnerService(logger *zap.Logger) (runnerv1.RunnerServiceServer, error)
- func NewSessionList() *lru.Cache[*Session]
- func PrepareScriptFromCommands(cmds []string, shell string) string
- func ShellFromShellPath(programPath string) string
- type CommandMode
- type DaggerShell
- type ErrInvalidLanguage
- type ErrInvalidProgram
- type Executable
- type ExecutableConfig
- type ExitError
- type Go
- type Session
- func (s *Session) AddEnvs(context context.Context, envs []string) error
- func (s *Session) Complete()
- func (s *Session) Envs() ([]string, error)
- func (s *Session) Identifer() string
- func (s *Session) SensitiveEnvKeys() ([]string, error)
- func (s *Session) SetEnv(context context.Context, k string, v string) error
- func (s *Session) Subscribe(ctx context.Context, snapshotc chan<- owl.SetVarItems) error
- func (s *Session) UpdateStore(context context.Context, envs []string, newOrUpdated []string, ...) error
- type Shell
- type ShellRaw
- type ShellSession
- type TempFile
Constants ¶
View Source
const DaggerCustomShell = "dagger shell"
View Source
const SessionListCapacity = 1024
SessionListCapacity is a maximum number of entries stored in a single SessionList.
Variables ¶
View Source
var OpininatedEnvVarNamingRegexp = regexp.MustCompile(`^[A-Z_][A-Z0-9_]{1}[A-Z0-9_]*[A-Z][A-Z0-9_]*$`)
Only allow uppercase letters, digits and underscores, min three chars
Functions ¶
func ConvertRunnerProject ¶
func IsShellLanguage ¶
func IsSupported ¶
func NewRunnerService ¶
func NewRunnerService(logger *zap.Logger) (runnerv1.RunnerServiceServer, error)
func NewSessionList ¶
func ShellFromShellPath ¶
TODO(mxs): this method for determining shell is not strong, since shells can be aliased. we should probably run the shell to get this information
Types ¶
type CommandMode ¶
type CommandMode uint
const ( // Do not send script to program CommandModeNone CommandMode = iota // Send script as argument to "-c" CommandModeInlineShell // Send script as temporary file in cwd CommandModeTempFile // Send script as dagger shell CommandModeDaggerShell )
func GetCellProgram ¶
type DaggerShell ¶ added in v3.11.1
type DaggerShell struct { *ExecutableConfig Script string ProgramName string LanguageID string // contains filtered or unexported fields }
func (DaggerShell) DryRun ¶ added in v3.11.1
func (s DaggerShell) DryRun(ctx context.Context, w io.Writer)
func (DaggerShell) ExitCode ¶ added in v3.11.1
func (s DaggerShell) ExitCode() int
type ErrInvalidLanguage ¶
type ErrInvalidLanguage struct {
LanguageID string
}
func (ErrInvalidLanguage) Error ¶
func (e ErrInvalidLanguage) Error() string
type ErrInvalidProgram ¶
type ErrInvalidProgram struct { Program string // contains filtered or unexported fields }
func (ErrInvalidProgram) Error ¶
func (e ErrInvalidProgram) Error() string
func (ErrInvalidProgram) Unwrap ¶
func (e ErrInvalidProgram) Unwrap() error
type Executable ¶
type ExecutableConfig ¶
type ExitError ¶
func ExitErrorFromExec ¶
type Go ¶
type Go struct { *ExecutableConfig Source string // contains filtered or unexported fields }
type Session ¶
type Session struct { ID string Metadata map[string]string // contains filtered or unexported fields }
Session is an abstract entity separate from an execution. Currently, its main role is to keep track of environment variables.
func NewSession ¶
func NewSessionWithStore ¶ added in v3.2.0
func (*Session) SensitiveEnvKeys ¶ added in v3.2.2
type Shell ¶
type Shell struct { *ExecutableConfig Cmds []string CustomShell string // contains filtered or unexported fields }
func (Shell) ProgramPath ¶
type ShellSession ¶
type ShellSession struct {
// contains filtered or unexported fields
}
func NewShellSession ¶
func NewShellSession(command string) (*ShellSession, error)
func (*ShellSession) Close ¶
func (s *ShellSession) Close() error
func (*ShellSession) Done ¶
func (s *ShellSession) Done() <-chan struct{}
func (*ShellSession) Err ¶
func (s *ShellSession) Err() error
func (*ShellSession) ID ¶
func (s *ShellSession) ID() string
func (*ShellSession) Send ¶
func (s *ShellSession) Send(data []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.