build

package
v0.23.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTelemetryChannel = "official-binary"
	FIPSTelemetryChannel    = "official-fips-binary"
)
View Source
const TimeFormat = "2006/01/02 15:04:05"

TimeFormat is the reference format for build.Time. Make sure it stays in sync with the string passed to the linker in the root Makefile.

Variables

View Source
var (
	ErrInvalidLengthInfo        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInfo          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupInfo = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// Distribution is changed by the CCL init-time hook in non-APL builds.
	Distribution = "OSS"
)

Functions

func BinaryVersion

func BinaryVersion() string

BinaryVersion returns the version prefix, patch number and metadata of the current build.

func BinaryVersionPrefix

func BinaryVersionPrefix() string

BinaryVersionPrefix returns the version prefix of the current build.

func IsRelease

func IsRelease() bool

IsRelease returns true if the binary was produced by a "release" build.

func MakeIssueURL

func MakeIssueURL(issue int) string

MakeIssueURL produces a URL to a CockroachDB issue.

func SeemsOfficial

func SeemsOfficial() bool

SeemsOfficial reports whether this binary is likely to have come from an official release channel.

func TestingOverrideVersion

func TestingOverrideVersion(v string) func()

TestingOverrideVersion allows tests to override the binary version reported by cockroach.

Types

type Info

type Info struct {
	// go_version is the version of the Go toolchain used to compile this executable.
	GoVersion string `protobuf:"bytes,1,opt,name=go_version,json=goVersion" json:"go_version"`
	// tag is the binary version for the revision of the source code for
	// this executable.  This used to be the git tag for the build, but
	// has since moved to the contents of the `version.txt` file.
	Tag string `protobuf:"bytes,2,opt,name=tag" json:"tag"`
	// time is the time at which the build started.
	Time string `protobuf:"bytes,3,opt,name=time" json:"time"`
	// revision is the git commit identifier for the source code of this executable.
	Revision string `protobuf:"bytes,4,opt,name=revision" json:"revision"`
	// cgo_compiler is the C/C++ compiler used to build non-go dependencies.
	CgoCompiler string `protobuf:"bytes,5,opt,name=cgo_compiler,json=cgoCompiler" json:"cgo_compiler"`
	// cgo_target_triple is the platform identifier that identifies the cross-compilation target for C/C++ components.
	CgoTargetTriple string `protobuf:"bytes,10,opt,name=cgo_target_triple,json=cgoTargetTriple" json:"cgo_target_triple"`
	// platform is the platform identifiers that identifies the cross-compilation target for Go code.
	Platform string `protobuf:"bytes,6,opt,name=platform" json:"platform"`
	// distribution indicates which licensing conditions apply (OSS: full open source; CCL: includes CCL code).
	Distribution string `protobuf:"bytes,7,opt,name=distribution" json:"distribution"`
	// type indicates whether this is a development or release build.
	Type string `protobuf:"bytes,8,opt,name=type" json:"type"`
	// channel identifies through which product channel the executable was released.
	Channel string `protobuf:"bytes,9,opt,name=channel" json:"channel"`
	// env_channel identifies the product channel as overridden by the COCKROACH_CHANNEL environment variable.
	EnvChannel string `protobuf:"bytes,11,opt,name=env_channel,json=envChannel" json:"env_channel"`
	// enabled_assertions returns the value of 'CrdbTestBuild' (true iff compiled with 'crdb_test' tag)
	EnabledAssertions bool `protobuf:"varint,12,opt,name=enabled_assertions,json=enabledAssertions" json:"enabled_assertions"`
	// dependencies exists to allow tests that run against old clusters
	// to unmarshal JSON containing this field. The tag is unimportant,
	// but the field name must remain unchanged.
	//
	// alternatively, we could set jsonpb.Unmarshaler.AllowUnknownFields
	// to true in httputil.doJSONRequest, but that comes at the expense
	// of run-time type checking, which is nice to have.
	Dependencies *string `protobuf:"bytes,10000,opt,name=dependencies" json:"dependencies,omitempty"`
}

Info describes build information for this CockroachDB binary.

func GetInfo

func GetInfo() Info

GetInfo returns an Info struct populated with the build information.

func (*Info) Descriptor

func (*Info) Descriptor() ([]byte, []int)

func (Info) GoTime

func (b Info) GoTime() time.Time

GoTime parses the utcTime string and returns a time.Time.

func (Info) Long

func (b Info) Long() string

Long returns a pretty printed build summary

func (*Info) Marshal

func (m *Info) Marshal() (dAtA []byte, err error)

func (*Info) MarshalTo

func (m *Info) MarshalTo(dAtA []byte) (int, error)

func (*Info) MarshalToSizedBuffer

func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) Reset

func (m *Info) Reset()

func (Info) Short

func (b Info) Short() string

Short returns a pretty printed build and version summary.

func (*Info) Size

func (m *Info) Size() (n int)

func (*Info) String

func (m *Info) String() string

func (Info) Timestamp

func (b Info) Timestamp() (int64, error)

Timestamp parses the utcTime string and returns the number of seconds since epoch.

func (*Info) Unmarshal

func (m *Info) Unmarshal(dAtA []byte) error

func (*Info) XXX_DiscardUnknown

func (m *Info) XXX_DiscardUnknown()

func (*Info) XXX_Marshal

func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Info) XXX_Merge

func (m *Info) XXX_Merge(src proto.Message)

func (*Info) XXX_Size

func (m *Info) XXX_Size() int

func (*Info) XXX_Unmarshal

func (m *Info) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL