...

Package version

import "internal/trace/version"
Overview
Index

Overview ▾

func WriteHeader

func WriteHeader(w io.Writer, v Version) (int, error)

WriteHeader writes a header for a trace version v to w.

type Version

Version represents the version of a trace file.

type Version uint32
const (
    Go111   Version = 11
    Go119   Version = 19
    Go121   Version = 21
    Go122   Version = 22
    Go123   Version = 23
    Current         = Go123
)

func ReadHeader

func ReadHeader(r io.Reader) (Version, error)

ReadHeader reads the version of the trace out of the trace file's header, whose prefix must be present in v.

func (Version) Specs

func (v Version) Specs() []event.Spec

Specs returns the set of event.Specs for this version.

func (Version) Valid

func (v Version) Valid() bool