Documentation
¶
Overview ¶
Package logfollow contains shared CLI log stream follow loops.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deployment ¶
func Deployment(ctx context.Context, deps cliruntime.Deps, w io.Writer, stream *api.ProjectLogStream, cancel context.CancelFunc, terminal TerminalCheck, catchUp CatchUp) error
Deployment prints a deployment log stream until the deployment reaches a terminal status, then runs catchUp with the IDs already printed from the stream. If the stream closes before the deployment is terminal, it keeps polling so the catch-up search still runs.
func Runtime ¶
func Runtime(ctx context.Context, deps cliruntime.Deps, w io.Writer, open StreamOpener) error
Runtime follows a runtime log stream until the context is canceled. The backend holds a healthy connection open and tails new events, so a closed stream is treated as a transient disconnect: Runtime reconnects from the last stream cursor — resuming without replaying recent events — until the context is canceled. A failure to open the stream is surfaced to the caller.
Types ¶
type StreamOpener ¶
StreamOpener opens a project log stream, resuming after lastEventID when it is set. logfollow re-invokes it to reconnect a dropped stream from its last cursor.