Stream instance logs (SSE)
client.Instances.Logs(ctx, id, query) (*string, error)
/instances/{id}/logs
Streams instance logs as Server-Sent Events.
Use the source parameter to select which log to stream:
app(default): Guest application logs (serial console)vmm: Cloud Hypervisor VMM logshypeman: Hypeman operations log
Returns the last N lines (controlled by tail parameter), then optionally
continues streaming new lines if follow=true.
Parameters
id string
Returns
type InstanceLogsResponse string
Stream instance logs (SSE)
package main
import (
"context"
"fmt"
"github.com/onkernel/hypeman-go"
"github.com/onkernel/hypeman-go/option"
)
func main() {
client := hypeman.NewClient(
option.WithAPIKey("My API Key"),
)
stream := client.Instances.LogsStreaming(
context.TODO(),
"id",
hypeman.InstanceLogsParams{
},
)
if stream.Err() != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}