Documentation
¶
Index ¶
- type Call
- type CallExitReason
- type CallID
- type CallSummary
- type EnvGlobal
- type LinesReader
- type LogSplitFn
- type NextMultiLineFn
- type NextSingleLineFn
- type ReadWithCallback
- type Session
- func (sess *Session) Close() error
- func (sess *Session) Done() <-chan struct{}
- func (sess *Session) Each(fn func(name string, vr expand.Variable) bool)
- func (sess *Session) Exited() bool
- func (sess *Session) Get(name string) expand.Variable
- func (sess *Session) GetLastCall() *Call
- func (sess *Session) HasInterest(id CallID) (lvl logrus.Level, ok bool)
- func (sess *Session) ListInterests() (out []CallID)
- func (sess *Session) NewCallID() CallID
- func (sess *Session) Run(ctx context.Context, node syntax.Node) error
- func (sess *Session) RunCmd(ctx context.Context, args []string) error
- func (sess *Session) RunInclude(ctx context.Context, includePath string) error
- func (sess *Session) RunNonRumorCmd(ctx context.Context, args []string) error
- func (sess *Session) SetBlocking(blocking bool)
- func (sess *Session) SetInterest(id CallID, lvl logrus.Level)
- func (sess *Session) UnsetInterest(id CallID)
- type SessionID
- type SessionProcessor
- func (sp *SessionProcessor) ClearLogData()
- func (sp *SessionProcessor) Close()
- func (sp *SessionProcessor) GetActor(name actor.ActorID) *actor.Actor
- func (sp *SessionProcessor) GetCall(id CallID) *Call
- func (sp *SessionProcessor) GetCalls(id actor.ActorID) map[CallID]CallSummary
- func (sp *SessionProcessor) GetLogData(key string) (value interface{}, ok bool)
- func (sp *SessionProcessor) IsClosing() bool
- func (sp *SessionProcessor) KillActor(id actor.ActorID)
- func (sp *SessionProcessor) MakeCall(actorName actor.ActorID, callID CallID, cmdArgs []string) *Call
- func (sp *SessionProcessor) NewSession(log logrus.FieldLogger) *Session
- func (sp *SessionProcessor) RemoveInterests(id CallID)
- type VoidWriter
- type WriteableFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallExitReason ¶
type CallExitReason uint8
const ( SuccessDone CallExitReason = iota RuntimeError ParseError )
func (CallExitReason) ExitErr ¶
func (code CallExitReason) ExitErr() error
type CallSummary ¶
type LinesReader ¶
type LinesReader struct {
Fn NextMultiLineFn
// contains filtered or unexported fields
}
LinesReader is used to convert a stream of lines back into a reader
type LogSplitFn ¶
type NextMultiLineFn ¶
Reads one or more lines at a time. The multi-line string may not end with a linebreak character, but should never end in the middle of an actual line.
type NextSingleLineFn ¶
type ReadWithCallback ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) GetLastCall ¶
func (*Session) HasInterest ¶
func (*Session) ListInterests ¶
func (*Session) Run ¶
Run interprets a node inside a Rumor session, using the mvdan shell package.
From the shell docs: A node can be a *File, *Stmt, or Command. If a non-nil error is returned, it will typically contain commands exit status, which can be retrieved with IsExitStatus.
Run can be called multiple times synchronously to interpret programs incrementally. To reuse a Runner without keeping the internal shell state, call Reset.
func (*Session) RunInclude ¶
func (*Session) RunNonRumorCmd ¶
func (*Session) SetBlocking ¶
func (*Session) UnsetInterest ¶
type SessionProcessor ¶
type SessionProcessor struct {
// contains filtered or unexported fields
}
func NewSessionProcessor ¶
func NewSessionProcessor(adminLog logrus.FieldLogger) *SessionProcessor
func (*SessionProcessor) ClearLogData ¶
func (sp *SessionProcessor) ClearLogData()
func (*SessionProcessor) Close ¶
func (sp *SessionProcessor) Close()
func (*SessionProcessor) GetActor ¶
func (sp *SessionProcessor) GetActor(name actor.ActorID) *actor.Actor
func (*SessionProcessor) GetCall ¶
func (sp *SessionProcessor) GetCall(id CallID) *Call
func (*SessionProcessor) GetCalls ¶
func (sp *SessionProcessor) GetCalls(id actor.ActorID) map[CallID]CallSummary
func (*SessionProcessor) GetLogData ¶
func (sp *SessionProcessor) GetLogData(key string) (value interface{}, ok bool)
func (*SessionProcessor) IsClosing ¶
func (sp *SessionProcessor) IsClosing() bool
func (*SessionProcessor) KillActor ¶
func (sp *SessionProcessor) KillActor(id actor.ActorID)
func (*SessionProcessor) NewSession ¶
func (sp *SessionProcessor) NewSession(log logrus.FieldLogger) *Session
func (*SessionProcessor) RemoveInterests ¶
func (sp *SessionProcessor) RemoveInterests(id CallID)
type VoidWriter ¶
type VoidWriter struct{}
type WriteableFn ¶
type WriteableFn func(msg string)