Documentation ¶
Index ¶
- Constants
- func ConvertRunnerProject(runnerProj *runnerv1.Project) (project.Project, error)
- func GlobalShellPath() string
- func IsShell(lang string) bool
- func IsShellLanguage(languageID string) bool
- func IsSupported(lang string) bool
- func NewRunnerService(logger *zap.Logger) (runnerv1.RunnerServiceServer, error)
- func NewRunnerServiceHandler(logger *zap.Logger) (runnerv1connect.RunnerServiceHandler, error)
- func PrepareScriptFromCommands(cmds []string, shell string) string
- func ResolveShellPath(customShell string) string
- func ShellFromShellPath(programPath string) string
- type CommandMode
- type ErrInvalidLanguage
- type ErrInvalidProgram
- type Executable
- type ExecutableConfig
- type ExitError
- type Go
- type Session
- 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 ¶
View Source
const (
MaxMsgSize = 4096 << 10 // 4 MiB
)
Variables ¶
This section is empty.
Functions ¶
func ConvertRunnerProject ¶ added in v1.4.0
func GlobalShellPath ¶ added in v1.2.1
func GlobalShellPath() string
func IsShellLanguage ¶ added in v1.6.0
func IsSupported ¶ added in v0.2.4
func NewRunnerService ¶ added in v0.6.0
func NewRunnerService(logger *zap.Logger) (runnerv1.RunnerServiceServer, error)
func NewRunnerServiceHandler ¶ added in v0.6.0
func NewRunnerServiceHandler(logger *zap.Logger) (runnerv1connect.RunnerServiceHandler, error)
func PrepareScriptFromCommands ¶ added in v0.6.0
func ResolveShellPath ¶ added in v1.2.1
func ShellFromShellPath ¶ added in v0.6.2
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
type ErrInvalidLanguage ¶ added in v1.6.0
type ErrInvalidLanguage struct {
LanguageID string
}
func (ErrInvalidLanguage) Error ¶ added in v1.6.0
func (e ErrInvalidLanguage) Error() string
type ErrInvalidProgram ¶ added in v1.6.0
type ErrInvalidProgram struct { Program string // contains filtered or unexported fields }
func (ErrInvalidProgram) Error ¶ added in v1.6.0
func (e ErrInvalidProgram) Error() string
func (ErrInvalidProgram) Unwrap ¶ added in v1.6.0
func (e ErrInvalidProgram) Unwrap() error
type Executable ¶
type ExecutableConfig ¶ added in v0.6.0
type ExitError ¶ added in v0.6.2
func ExitErrorFromExec ¶ added in v0.6.2
type Go ¶
type Go struct { *ExecutableConfig Source string // contains filtered or unexported fields }
type Session ¶ added in v0.6.0
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 ¶ added in v0.6.0
type SessionList ¶ added in v0.7.0
type SessionList struct {
// contains filtered or unexported fields
}
thread-safe session list
func NewSessionList ¶ added in v0.7.0
func NewSessionList() (*SessionList, error)
func (*SessionList) AddSession ¶ added in v0.7.0
func (sl *SessionList) AddSession(session *Session)
func (*SessionList) CreateAndAddSession ¶ added in v0.7.0
func (sl *SessionList) CreateAndAddSession(generate func() (*Session, error)) (*Session, error)
func (*SessionList) DeleteSession ¶ added in v0.7.0
func (sl *SessionList) DeleteSession(id string) (present bool)
func (*SessionList) GetSession ¶ added in v0.7.0
func (sl *SessionList) GetSession(id string) (*Session, bool)
func (*SessionList) ListSessions ¶ added in v0.7.0
func (sl *SessionList) ListSessions() ([]*Session, error)
func (*SessionList) MostRecent ¶ added in v0.7.0
func (sl *SessionList) MostRecent() (*Session, bool)
func (*SessionList) MostRecentOrCreate ¶ added in v0.7.0
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 ¶ added in v0.6.0
type ShellSession ¶ added in v0.6.0
type ShellSession struct {
// contains filtered or unexported fields
}
func NewShellSession ¶ added in v0.6.0
func NewShellSession(command string) (*ShellSession, error)
func (*ShellSession) Close ¶ added in v0.6.0
func (s *ShellSession) Close() error
func (*ShellSession) Done ¶ added in v0.6.0
func (s *ShellSession) Done() <-chan struct{}
func (*ShellSession) Err ¶ added in v0.6.0
func (s *ShellSession) Err() error
func (*ShellSession) ID ¶ added in v0.6.0
func (s *ShellSession) ID() string
func (*ShellSession) Send ¶ added in v0.6.0
func (s *ShellSession) Send(data []byte) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.