@@ -83,9 +83,15 @@ func (r *InstanceService) Get(ctx context.Context, id string, opts ...option.Req
8383 return
8484}
8585
86- // Streams instance console logs as Server-Sent Events. Returns the last N lines
87- // (controlled by `tail` parameter), then optionally continues streaming new lines
88- // if `follow=true`.
86+ // Streams instance logs as Server-Sent Events. Use the `source` parameter to
87+ // select which log to stream:
88+ //
89+ // - `app` (default): Guest application logs (serial console)
90+ // - `vmm`: Cloud Hypervisor VMM logs
91+ // - `hypeman`: Hypeman operations log
92+ //
93+ // Returns the last N lines (controlled by `tail` parameter), then optionally
94+ // continues streaming new lines if `follow=true`.
8995func (r * InstanceService ) LogsStreaming (ctx context.Context , id string , query InstanceLogsParams , opts ... option.RequestOption ) (stream * ssestream.Stream [string ]) {
9096 var (
9197 raw * http.Response
@@ -385,6 +391,14 @@ type InstanceLogsParams struct {
385391 Follow param.Opt [bool ] `query:"follow,omitzero" json:"-"`
386392 // Number of lines to return from end
387393 Tail param.Opt [int64 ] `query:"tail,omitzero" json:"-"`
394+ // Log source to stream:
395+ //
396+ // - app: Guest application logs (serial console output)
397+ // - vmm: Cloud Hypervisor VMM logs (hypervisor stdout+stderr)
398+ // - hypeman: Hypeman operations log (actions taken on this instance)
399+ //
400+ // Any of "app", "vmm", "hypeman".
401+ Source InstanceLogsParamsSource `query:"source,omitzero" json:"-"`
388402 paramObj
389403}
390404
@@ -395,3 +409,16 @@ func (r InstanceLogsParams) URLQuery() (v url.Values, err error) {
395409 NestedFormat : apiquery .NestedQueryFormatBrackets ,
396410 })
397411}
412+
413+ // Log source to stream:
414+ //
415+ // - app: Guest application logs (serial console output)
416+ // - vmm: Cloud Hypervisor VMM logs (hypervisor stdout+stderr)
417+ // - hypeman: Hypeman operations log (actions taken on this instance)
418+ type InstanceLogsParamsSource string
419+
420+ const (
421+ InstanceLogsParamsSourceApp InstanceLogsParamsSource = "app"
422+ InstanceLogsParamsSourceVmm InstanceLogsParamsSource = "vmm"
423+ InstanceLogsParamsSourceHypeman InstanceLogsParamsSource = "hypeman"
424+ )
0 commit comments