Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2023, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FollowLogs ¶ added in v0.7.2
func FollowLogs(ctx context.Context, machine *machineapi.Machine, controller machineapi.MachineService, consumer LogConsumer) error
FollowLogs tracks the logs generated by a machine and prints them to the context out stream.
Types ¶
type ColorfulConsumer ¶ added in v0.8.3
type ColorfulConsumer struct {
// contains filtered or unexported fields
}
func NewColorfulConsumer ¶ added in v0.7.2
func NewColorfulConsumer(streams *iostreams.IOStreams, color bool, prefix string) (*ColorfulConsumer, error)
NewColorfulConsumer creates a new log consumer which prefixes each line with a colorful prefix.
func (*ColorfulConsumer) Consume ¶ added in v0.8.3
func (c *ColorfulConsumer) Consume(strs ...string)
Consume implements logConsumer
type LogConsumer ¶ added in v0.7.3
type LogConsumer interface {
Consume(line ...string)
}