Documentation
¶
Index ¶
- type CommandFactory
- type ExecutionContext
- type PrepareFunc
- type Session
- func Start(ctx context.Context, command, workdir string, env []string, ...) (*Session, map[string]any, error)
- func StartCommandWithTTY(ctx context.Context, build CommandFactory, timeout time.Duration, tty bool, ...) (*Session, map[string]any, error)
- func StartWithTTY(ctx context.Context, command, workdir string, env []string, ...) (*Session, map[string]any, error)
- func (s *Session) CloseStdin() error
- func (s *Session) Completed() bool
- func (s *Session) CompletedBefore(cutoff time.Time) bool
- func (s *Session) Kill() bool
- func (s *Session) Peek(status string, maxBytes int) map[string]any
- func (s *Session) SetExecutionContext(execution ExecutionContext)
- func (s *Session) Snapshot(status string, maxBytes int) map[string]any
- func (s *Session) Summary() Summary
- func (s *Session) WaitError() error
- func (s *Session) Write(text string) error
- type Store
- func (s *Store) Add(session *Session)
- func (s *Store) AddReserved(session *Session)
- func (s *Store) Delete(id string)
- func (s *Store) Get(id string) (*Session, bool)
- func (s *Store) List() []*Session
- func (s *Store) PruneCompletedBefore(cutoff time.Time) int
- func (s *Store) PruneCompletedToLimit(limit int) int
- func (s *Store) ReleaseReservation()
- func (s *Store) ReservationCount() int
- func (s *Store) TryReserve(maxRunning int) bool
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionContext ¶
type Session ¶
type Session struct {
ID string
Command *exec.Cmd
Cancel context.CancelFunc
Stdin io.WriteCloser
StartedAt time.Time
FinishedAt time.Time
Done chan struct{}
TimedOut bool
Terminal string
// contains filtered or unexported fields
}
func StartCommandWithTTY ¶
func StartWithTTY ¶
func (*Session) CloseStdin ¶
func (*Session) Peek ¶
Peek returns the current unread output without advancing the observation cursors. Mutation tools use it so a following status call still receives the output.
func (*Session) SetExecutionContext ¶
func (s *Session) SetExecutionContext(execution ExecutionContext)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddReserved ¶
func (*Store) PruneCompletedToLimit ¶
func (*Store) ReleaseReservation ¶
func (s *Store) ReleaseReservation()
func (*Store) ReservationCount ¶
func (*Store) TryReserve ¶
Click to show internal directories.
Click to hide internal directories.