Documentation ¶
Index ¶
- 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 PrepareScriptFromCommands(cmds []string, shell string) string
- func ShellFromShellPath(programPath string) string
- type CommandMode
- type ErrInvalidLanguage
- type ErrInvalidProgram
- type Executable
- type ExecutableConfig
- type ExitError
- type Go
- type Session
- func (s *Session) AddEnvs(envs []string) error
- func (s *Session) Complete()
- func (s *Session) Envs() ([]string, error)
- func (s *Session) SensitiveEnvKeys() ([]string, error)
- func (s *Session) SetEnv(k string, v string) error
- func (s *Session) Subscribe(ctx context.Context, snapshotc chan<- owl.SetVarItems) error
- func (s *Session) UpdateStore(envs []string, newOrUpdated []string, deleted []string) error
- type SessionList
- func (sl *SessionList) AddSession(session *Session)
- func (sl *SessionList) CreateAndAddSession(generate func() (*Session, error)) (*Session, error)
- func (sl *SessionList) DeleteSession(id string) (present bool)
- func (sl *SessionList) GetSession(id string) (*Session, bool)
- func (sl *SessionList) ListSessions() ([]*Session, error)
- func (sl *SessionList) MostRecent() (*Session, bool)
- func (sl *SessionList) MostRecentOrCreate(generate func() (*Session, error)) (*Session, error)
- type Shell
- type ShellRaw
- type ShellSession
- type TempFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRunnerProject ¶
func IsShellLanguage ¶
func IsSupported ¶
func NewRunnerService ¶
func NewRunnerService(logger *zap.Logger) (runnerv1.RunnerServiceServer, error)
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 )
func GetCellProgram ¶
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 SessionList ¶
type SessionList struct {
// contains filtered or unexported fields
}
thread-safe session list
func NewSessionList ¶
func NewSessionList() (*SessionList, error)
func (*SessionList) AddSession ¶
func (sl *SessionList) AddSession(session *Session)
func (*SessionList) CreateAndAddSession ¶
func (sl *SessionList) CreateAndAddSession(generate func() (*Session, error)) (*Session, error)
func (*SessionList) DeleteSession ¶
func (sl *SessionList) DeleteSession(id string) (present bool)
func (*SessionList) GetSession ¶
func (sl *SessionList) GetSession(id string) (*Session, bool)
func (*SessionList) ListSessions ¶
func (sl *SessionList) ListSessions() ([]*Session, error)
func (*SessionList) MostRecent ¶
func (sl *SessionList) MostRecent() (*Session, bool)
func (*SessionList) MostRecentOrCreate ¶
func (sl *SessionList) MostRecentOrCreate(generate func() (*Session, error)) (*Session, error)
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.