cockroach: Index | Files

package build

import ""


Package Files

cgo_compiler.go info.go info.pb.go


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.


var (
    ErrInvalidLengthInfo = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowInfo   = fmt.Errorf("proto: integer overflow")
var (

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

func IsRelease Uses

func IsRelease() bool

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

func SeemsOfficial Uses

func SeemsOfficial() bool

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

func TestingOverrideTag Uses

func TestingOverrideTag(t string) func()

TestingOverrideTag allows tests to override the build tag.

func VersionPrefix Uses

func VersionPrefix() string

VersionPrefix returns the version prefix of the current build.

type Info Uses

type Info struct {
    GoVersion       string `protobuf:"bytes,1,opt,name=go_version,json=goVersion" json:"go_version"`
    Tag             string `protobuf:"bytes,2,opt,name=tag" json:"tag"`
    Time            string `protobuf:"bytes,3,opt,name=time" json:"time"`
    Revision        string `protobuf:"bytes,4,opt,name=revision" json:"revision"`
    CgoCompiler     string `protobuf:"bytes,5,opt,name=cgo_compiler,json=cgoCompiler" json:"cgo_compiler"`
    CgoTargetTriple string `protobuf:"bytes,10,opt,name=cgo_target_triple,json=cgoTargetTriple" json:"cgo_target_triple"`
    Platform        string `protobuf:"bytes,6,opt,name=platform" json:"platform"`
    Distribution    string `protobuf:"bytes,7,opt,name=distribution" json:"distribution"`
    Type            string `protobuf:"bytes,8,opt,name=type" json:"type"`
    Channel         string `protobuf:"bytes,9,opt,name=channel" json:"channel"`
    EnvChannel      string `protobuf:"bytes,11,opt,name=env_channel,json=envChannel" json:"env_channel"`
    // 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 Uses

func GetInfo() Info

GetInfo returns an Info struct populated with the build information.

func (*Info) Descriptor Uses

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

func (Info) GoTime Uses

func (b Info) GoTime() time.Time

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

func (*Info) Marshal Uses

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

func (*Info) MarshalTo Uses

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

func (*Info) ProtoMessage Uses

func (*Info) ProtoMessage()

func (*Info) Reset Uses

func (m *Info) Reset()

func (Info) Short Uses

func (b Info) Short() string

Short returns a pretty printed build and version summary.

func (*Info) Size Uses

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

func (*Info) String Uses

func (m *Info) String() string

func (Info) Timestamp Uses

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

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

func (*Info) Unmarshal Uses

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

func (*Info) XXX_DiscardUnknown Uses

func (m *Info) XXX_DiscardUnknown()

func (*Info) XXX_Marshal Uses

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

func (*Info) XXX_Merge Uses

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

func (*Info) XXX_Size Uses

func (m *Info) XXX_Size() int

func (*Info) XXX_Unmarshal Uses

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

Package build imports 9 packages (graph) and is imported by 358 packages. Updated 2020-06-02. Refresh now. Tools for package owners.