github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/trace/v2/raw/event.go (about) 1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package raw 6 7 import ( 8 "github.com/shogo82148/std/internal/trace/v2/event" 9 "github.com/shogo82148/std/internal/trace/v2/version" 10 ) 11 12 // Event is a simple representation of a trace event. 13 // 14 // Note that this typically includes much more than just 15 // timestamped events, and it also represents parts of the 16 // trace format's framing. (But not interpreted.) 17 type Event struct { 18 Version version.Version 19 Ev event.Type 20 Args []uint64 21 Data []byte 22 } 23 24 // String returns the canonical string representation of the event. 25 // 26 // This format is the same format that is parsed by the TextReader 27 // and emitted by the TextWriter. 28 func (e *Event) String() string