Documentation ¶
Overview ¶
DataFrame wraps the byte framing used by docker to multiplex output from a docker container when there is no TTY in use. Although docker provides some functions to work with this stream, we want to keep our data in this form as long as possible, as well as making it implementable by other executors.
Docker documents this as:
[8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT}
STREAM_TYPE can be 1 for stdout and 2 for stderr
SIZE1, SIZE2, SIZE3, and SIZE4 are four bytes of uint32 encoded as big endian. This is the size of OUTPUT.
Index ¶
- Constants
- func ConfigureLogging(modeStr, levelStr string) error
- func ConfigureTestLogging(t tTesting)
- func ContextWithNodeIDLogger(ctx context.Context, nodeID string) context.Context
- func ErrOrDebug(err error) zerolog.Level
- func LogBufferedLogs(writer io.Writer)
- func LogStream(ctx context.Context, r io.Reader)
- func ToSliceStringer[T any](ts []T, f func(t T) string) []fmt.Stringer
- func ToStringer[T any](t T, f func(t T) string) fmt.Stringer
- type DataFrame
- type LogMode
- type StreamTag
Constants ¶
const HeaderLength = 8
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogging ¶
func ConfigureTestLogging ¶
func ConfigureTestLogging(t tTesting)
ConfigureTestLogging allows logs to be associated with individual tests
func ContextWithNodeIDLogger ¶
ContextWithNodeIDLogger will return a context with nodeID is added to the logging context.
func ErrOrDebug ¶ added in v0.3.29
func LogBufferedLogs ¶
LogBufferedLogs will log any log messages written from before logging was configured to the given writer. If writer is nil, then the default logging will be used instead. This function will do nothing once the buffer has been outputted.
func ToSliceStringer ¶ added in v0.3.24
Types ¶
type DataFrame ¶ added in v0.3.29
func NewDataFrameFromData ¶ added in v0.3.29
NewDataFrameFromBytes will compose a new data frame wrapping the provided tag and data with the necessary structure.