telemetry

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthReport        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReport          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupReport = fmt.Errorf("proto: unexpected end of group")
)

Functions

func Enabled

func Enabled() bool

Enabled return true if we enable telemetry.

func FillNodeInfo

func FillNodeInfo(ctx context.Context, info *NodeInfo) (err error)

FillNodeInfo fill HardwareInfo and Os info.

func GetSecret

func GetSecret() string

GetSecret return telemetry encrypt secret.

func GetUUID

func GetUUID() string

GetUUID return telemetry uuid.

func NewSecret

func NewSecret() string

NewSecret generates a new random string as encryption secret

func NewUUID

func NewUUID() string

NewUUID return a new uuid.

func NodeInfoToText

func NodeInfoToText(info *NodeInfo) (text string, err error)

NodeInfoToText get telemetry.NodeInfo in text.

func SaltedHash

func SaltedHash(val string, salt ...string) string

SaltedHash preprend the secret before hashing input

func ScrubYaml

func ScrubYaml(
	data []byte,
	hashFieldNames set.StringSet,
	omitFieldNames set.StringSet,
	salt string,
) (scrubed []byte, err error)

ScrubYaml scrub the values in yaml

Types

type CPUInfo

type CPUInfo struct {
	Numcpu               int32    `protobuf:"varint,1,opt,name=numcpu,proto3" json:"numcpu,omitempty"`
	Sockets              int32    `protobuf:"varint,2,opt,name=sockets,proto3" json:"sockets,omitempty"`
	Cores                int32    `protobuf:"varint,3,opt,name=cores,proto3" json:"cores,omitempty"`
	Model                string   `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
	Mhz                  float32  `protobuf:"fixed32,5,opt,name=mhz,proto3" json:"mhz,omitempty"`
	Features             []string `protobuf:"bytes,6,rep,name=features,proto3" json:"features,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CPUInfo) Descriptor

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

func (*CPUInfo) GetCores

func (m *CPUInfo) GetCores() int32

func (*CPUInfo) GetFeatures

func (m *CPUInfo) GetFeatures() []string

func (*CPUInfo) GetMhz

func (m *CPUInfo) GetMhz() float32

func (*CPUInfo) GetModel

func (m *CPUInfo) GetModel() string

func (*CPUInfo) GetNumcpu

func (m *CPUInfo) GetNumcpu() int32

func (*CPUInfo) GetSockets

func (m *CPUInfo) GetSockets() int32

func (*CPUInfo) Marshal

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

func (*CPUInfo) MarshalTo

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

func (*CPUInfo) MarshalToSizedBuffer

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

func (*CPUInfo) ProtoMessage

func (*CPUInfo) ProtoMessage()

func (*CPUInfo) Reset

func (m *CPUInfo) Reset()

func (*CPUInfo) Size

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

func (*CPUInfo) String

func (m *CPUInfo) String() string

func (*CPUInfo) Unmarshal

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

func (*CPUInfo) XXX_DiscardUnknown

func (m *CPUInfo) XXX_DiscardUnknown()

func (*CPUInfo) XXX_Marshal

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

func (*CPUInfo) XXX_Merge

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

func (*CPUInfo) XXX_Size

func (m *CPUInfo) XXX_Size() int

func (*CPUInfo) XXX_Unmarshal

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

type ClusterReport

type ClusterReport struct {
	ID               string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Command          string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	TakeMilliseconds uint64 `protobuf:"varint,3,opt,name=take_milliseconds,json=takeMilliseconds,proto3" json:"take_milliseconds,omitempty"`
	ExitCode         int32  `protobuf:"varint,4,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// only deploy and scale-out is setted:
	Topology             string      `protobuf:"bytes,5,opt,name=topology,proto3" json:"topology,omitempty"`
	Nodes                []*NodeInfo `protobuf:"bytes,6,rep,name=nodes,proto3" json:"nodes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*ClusterReport) Descriptor

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

func (*ClusterReport) GetCommand

func (m *ClusterReport) GetCommand() string

func (*ClusterReport) GetExitCode

func (m *ClusterReport) GetExitCode() int32

func (*ClusterReport) GetID

func (m *ClusterReport) GetID() string

func (*ClusterReport) GetNodes

func (m *ClusterReport) GetNodes() []*NodeInfo

func (*ClusterReport) GetTakeMilliseconds

func (m *ClusterReport) GetTakeMilliseconds() uint64

func (*ClusterReport) GetTopology

func (m *ClusterReport) GetTopology() string

func (*ClusterReport) Marshal

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

func (*ClusterReport) MarshalTo

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

func (*ClusterReport) MarshalToSizedBuffer

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

func (*ClusterReport) ProtoMessage

func (*ClusterReport) ProtoMessage()

func (*ClusterReport) Reset

func (m *ClusterReport) Reset()

func (*ClusterReport) Size

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

func (*ClusterReport) String

func (m *ClusterReport) String() string

func (*ClusterReport) Unmarshal

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

func (*ClusterReport) XXX_DiscardUnknown

func (m *ClusterReport) XXX_DiscardUnknown()

func (*ClusterReport) XXX_Marshal

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

func (*ClusterReport) XXX_Merge

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

func (*ClusterReport) XXX_Size

func (m *ClusterReport) XXX_Size() int

func (*ClusterReport) XXX_Unmarshal

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

type HardwareInfo

type HardwareInfo struct {
	Virtualization       string   `protobuf:"bytes,1,opt,name=virtualization,proto3" json:"virtualization,omitempty"`
	Cpu                  CPUInfo  `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu"`
	Mem                  MemInfo  `protobuf:"bytes,3,opt,name=mem,proto3" json:"mem"`
	Loadavg15            float32  `protobuf:"fixed32,4,opt,name=loadavg15,proto3" json:"loadavg15,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func GetHardwareInfo

func GetHardwareInfo(ctx context.Context) (info HardwareInfo, err error)

GetHardwareInfo get the HardwareInfo.

func (*HardwareInfo) Descriptor

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

func (*HardwareInfo) GetCpu

func (m *HardwareInfo) GetCpu() CPUInfo

func (*HardwareInfo) GetLoadavg15

func (m *HardwareInfo) GetLoadavg15() float32

func (*HardwareInfo) GetMem

func (m *HardwareInfo) GetMem() MemInfo

func (*HardwareInfo) GetVirtualization

func (m *HardwareInfo) GetVirtualization() string

func (*HardwareInfo) Marshal

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

func (*HardwareInfo) MarshalTo

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

func (*HardwareInfo) MarshalToSizedBuffer

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

func (*HardwareInfo) ProtoMessage

func (*HardwareInfo) ProtoMessage()

func (*HardwareInfo) Reset

func (m *HardwareInfo) Reset()

func (*HardwareInfo) Size

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

func (*HardwareInfo) String

func (m *HardwareInfo) String() string

func (*HardwareInfo) Unmarshal

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

func (*HardwareInfo) XXX_DiscardUnknown

func (m *HardwareInfo) XXX_DiscardUnknown()

func (*HardwareInfo) XXX_Marshal

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

func (*HardwareInfo) XXX_Merge

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

func (*HardwareInfo) XXX_Size

func (m *HardwareInfo) XXX_Size() int

func (*HardwareInfo) XXX_Unmarshal

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

type MemInfo

type MemInfo struct {
	Total                uint64   `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Available            uint64   `protobuf:"varint,2,opt,name=available,proto3" json:"available,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MemInfo) Descriptor

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

func (*MemInfo) GetAvailable

func (m *MemInfo) GetAvailable() uint64

func (*MemInfo) GetTotal

func (m *MemInfo) GetTotal() uint64

func (*MemInfo) Marshal

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

func (*MemInfo) MarshalTo

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

func (*MemInfo) MarshalToSizedBuffer

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

func (*MemInfo) ProtoMessage

func (*MemInfo) ProtoMessage()

func (*MemInfo) Reset

func (m *MemInfo) Reset()

func (*MemInfo) Size

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

func (*MemInfo) String

func (m *MemInfo) String() string

func (*MemInfo) Unmarshal

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

func (*MemInfo) XXX_DiscardUnknown

func (m *MemInfo) XXX_DiscardUnknown()

func (*MemInfo) XXX_Marshal

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

func (*MemInfo) XXX_Merge

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

func (*MemInfo) XXX_Size

func (m *MemInfo) XXX_Size() int

func (*MemInfo) XXX_Unmarshal

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

type Meta

type Meta struct {
	UUID   string `yaml:"uuid,omitempty"`
	Secret string `yaml:"secret,omitempty"`
	Status Status `yaml:"status,omitempty"`
}

Meta data of telemetry.

func GetMeta

func GetMeta(env *environment.Environment) (meta *Meta, fname string, err error)

GetMeta read the telemeta from disk

func LoadFrom

func LoadFrom(fname string) (meta *Meta, err error)

LoadFrom load meta from the specify file, return a default Meta and save it if the file not exist.

func NewMeta

func NewMeta() *Meta

NewMeta create a new default Meta.

func (*Meta) SaveTo

func (m *Meta) SaveTo(fname string) error

SaveTo save to the specified file.

type NodeInfo

type NodeInfo struct {
	NodeId               string       `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	Hardware             HardwareInfo `protobuf:"bytes,6,opt,name=hardware,proto3" json:"hardware"`
	Os                   OSInfo       `protobuf:"bytes,7,opt,name=os,proto3" json:"os"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func NodeInfoFromText

func NodeInfoFromText(text string) (info *NodeInfo, err error)

NodeInfoFromText get telemetry.NodeInfo from the text.

func (*NodeInfo) Descriptor

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

func (*NodeInfo) GetHardware

func (m *NodeInfo) GetHardware() HardwareInfo

func (*NodeInfo) GetNodeId

func (m *NodeInfo) GetNodeId() string

func (*NodeInfo) GetOs

func (m *NodeInfo) GetOs() OSInfo

func (*NodeInfo) Marshal

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

func (*NodeInfo) MarshalTo

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

func (*NodeInfo) MarshalToSizedBuffer

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

func (*NodeInfo) ProtoMessage

func (*NodeInfo) ProtoMessage()

func (*NodeInfo) Reset

func (m *NodeInfo) Reset()

func (*NodeInfo) Size

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

func (*NodeInfo) String

func (m *NodeInfo) String() string

func (*NodeInfo) Unmarshal

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

func (*NodeInfo) XXX_DiscardUnknown

func (m *NodeInfo) XXX_DiscardUnknown()

func (*NodeInfo) XXX_Marshal

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

func (*NodeInfo) XXX_Merge

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

func (*NodeInfo) XXX_Size

func (m *NodeInfo) XXX_Size() int

func (*NodeInfo) XXX_Unmarshal

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

type OSInfo

type OSInfo struct {
	Family               string   `protobuf:"bytes,1,opt,name=family,proto3" json:"family,omitempty"`
	Platform             string   `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"`
	Version              string   `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func GetOSInfo

func GetOSInfo(ctx context.Context) (info OSInfo, err error)

GetOSInfo get the OSInfo.

func (*OSInfo) Descriptor

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

func (*OSInfo) GetFamily

func (m *OSInfo) GetFamily() string

func (*OSInfo) GetPlatform

func (m *OSInfo) GetPlatform() string

func (*OSInfo) GetVersion

func (m *OSInfo) GetVersion() string

func (*OSInfo) Marshal

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

func (*OSInfo) MarshalTo

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

func (*OSInfo) MarshalToSizedBuffer

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

func (*OSInfo) ProtoMessage

func (*OSInfo) ProtoMessage()

func (*OSInfo) Reset

func (m *OSInfo) Reset()

func (*OSInfo) Size

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

func (*OSInfo) String

func (m *OSInfo) String() string

func (*OSInfo) Unmarshal

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

func (*OSInfo) XXX_DiscardUnknown

func (m *OSInfo) XXX_DiscardUnknown()

func (*OSInfo) XXX_Marshal

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

func (*OSInfo) XXX_Merge

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

func (*OSInfo) XXX_Size

func (m *OSInfo) XXX_Size() int

func (*OSInfo) XXX_Unmarshal

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

type PlaygroundReport

type PlaygroundReport struct {
	Topology             string   `protobuf:"bytes,1,opt,name=topology,proto3" json:"topology,omitempty"`
	TakeMilliseconds     uint64   `protobuf:"varint,2,opt,name=take_milliseconds,json=takeMilliseconds,proto3" json:"take_milliseconds,omitempty"`
	ExitCode             int32    `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PlaygroundReport) Descriptor

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

func (*PlaygroundReport) GetExitCode

func (m *PlaygroundReport) GetExitCode() int32

func (*PlaygroundReport) GetTakeMilliseconds

func (m *PlaygroundReport) GetTakeMilliseconds() uint64

func (*PlaygroundReport) GetTopology

func (m *PlaygroundReport) GetTopology() string

func (*PlaygroundReport) Marshal

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

func (*PlaygroundReport) MarshalTo

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

func (*PlaygroundReport) MarshalToSizedBuffer

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

func (*PlaygroundReport) ProtoMessage

func (*PlaygroundReport) ProtoMessage()

func (*PlaygroundReport) Reset

func (m *PlaygroundReport) Reset()

func (*PlaygroundReport) Size

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

func (*PlaygroundReport) String

func (m *PlaygroundReport) String() string

func (*PlaygroundReport) Unmarshal

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

func (*PlaygroundReport) XXX_DiscardUnknown

func (m *PlaygroundReport) XXX_DiscardUnknown()

func (*PlaygroundReport) XXX_Marshal

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

func (*PlaygroundReport) XXX_Merge

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

func (*PlaygroundReport) XXX_Size

func (m *PlaygroundReport) XXX_Size() int

func (*PlaygroundReport) XXX_Unmarshal

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

type Report

type Report struct {
	InstallationUUID   string    `protobuf:"bytes,1,opt,name=installationUUID,proto3" json:"installationUUID,omitempty"`
	EventUUID          string    `protobuf:"bytes,2,opt,name=eventUUID,proto3" json:"eventUUID,omitempty"`
	EventUnixTimestamp int64     `protobuf:"varint,3,opt,name=event_unix_timestamp,json=eventUnixTimestamp,proto3" json:"event_unix_timestamp,omitempty"`
	Version            *TiUPInfo `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	// Types that are valid to be assigned to EventDetail:
	//	*Report_Tiup
	//	*Report_Cluster
	//	*Report_Playground
	EventDetail          isReport_EventDetail `protobuf_oneof:"event_detail"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Report) Descriptor

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

func (*Report) GetCluster

func (m *Report) GetCluster() *ClusterReport

func (*Report) GetEventDetail

func (m *Report) GetEventDetail() isReport_EventDetail

func (*Report) GetEventUUID

func (m *Report) GetEventUUID() string

func (*Report) GetEventUnixTimestamp

func (m *Report) GetEventUnixTimestamp() int64

func (*Report) GetInstallationUUID

func (m *Report) GetInstallationUUID() string

func (*Report) GetPlayground

func (m *Report) GetPlayground() *PlaygroundReport

func (*Report) GetTiup

func (m *Report) GetTiup() *TiUPReport

func (*Report) GetVersion

func (m *Report) GetVersion() *TiUPInfo

func (*Report) Marshal

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

func (*Report) MarshalTo

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

func (*Report) MarshalToSizedBuffer

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

func (*Report) ProtoMessage

func (*Report) ProtoMessage()

func (*Report) Reset

func (m *Report) Reset()

func (*Report) Size

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

func (*Report) String

func (m *Report) String() string

func (*Report) Unmarshal

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

func (*Report) XXX_DiscardUnknown

func (m *Report) XXX_DiscardUnknown()

func (*Report) XXX_Marshal

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

func (*Report) XXX_Merge

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

func (*Report) XXX_OneofWrappers

func (*Report) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Report) XXX_Size

func (m *Report) XXX_Size() int

func (*Report) XXX_Unmarshal

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

type Report_Cluster

type Report_Cluster struct {
	Cluster *ClusterReport `protobuf:"bytes,6,opt,name=cluster,proto3,oneof" json:"cluster,omitempty"`
}

func (*Report_Cluster) MarshalTo

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

func (*Report_Cluster) MarshalToSizedBuffer

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

func (*Report_Cluster) Size

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

type Report_Playground

type Report_Playground struct {
	Playground *PlaygroundReport `protobuf:"bytes,7,opt,name=playground,proto3,oneof" json:"playground,omitempty"`
}

func (*Report_Playground) MarshalTo

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

func (*Report_Playground) MarshalToSizedBuffer

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

func (*Report_Playground) Size

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

type Report_Tiup

type Report_Tiup struct {
	Tiup *TiUPReport `protobuf:"bytes,5,opt,name=tiup,proto3,oneof" json:"tiup,omitempty"`
}

func (*Report_Tiup) MarshalTo

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

func (*Report_Tiup) MarshalToSizedBuffer

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

func (*Report_Tiup) Size

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

type ScrubStrategy

type ScrubStrategy int

ScrubStrategy for scrub sensible value.

type Status

type Status string

Status of telemetry.

const (
	EnableStatus  Status = "enable"
	DisableStatus Status = "disable"
)

Status of telemetry

type Telemetry

type Telemetry struct {
	// contains filtered or unexported fields
}

Telemetry control telemetry.

func NewTelemetry

func NewTelemetry() *Telemetry

NewTelemetry return a new Telemetry instance.

func (*Telemetry) Report

func (t *Telemetry) Report(ctx context.Context, msg *Report) error

Report report the msg right away.

type TiUPInfo

type TiUPInfo struct {
	TiUPVersion          string   `protobuf:"bytes,1,opt,name=TiUPVersion,proto3" json:"TiUPVersion,omitempty"`
	ComponentVersion     string   `protobuf:"bytes,2,opt,name=ComponentVersion,proto3" json:"ComponentVersion,omitempty"`
	GitRef               string   `protobuf:"bytes,3,opt,name=GitRef,proto3" json:"GitRef,omitempty"`
	GitCommit            string   `protobuf:"bytes,4,opt,name=GitCommit,proto3" json:"GitCommit,omitempty"`
	VerName              string   `protobuf:"bytes,5,opt,name=VerName,proto3" json:"VerName,omitempty"`
	Os                   string   `protobuf:"bytes,6,opt,name=os,proto3" json:"os,omitempty"`
	Arch                 string   `protobuf:"bytes,7,opt,name=arch,proto3" json:"arch,omitempty"`
	Go                   string   `protobuf:"bytes,8,opt,name=go,proto3" json:"go,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func TiUPMeta

func TiUPMeta() *TiUPInfo

TiUPMeta returns metadata of TiUP Cluster itself

func (*TiUPInfo) Descriptor

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

func (*TiUPInfo) GetArch

func (m *TiUPInfo) GetArch() string

func (*TiUPInfo) GetComponentVersion

func (m *TiUPInfo) GetComponentVersion() string

func (*TiUPInfo) GetGitCommit

func (m *TiUPInfo) GetGitCommit() string

func (*TiUPInfo) GetGitRef

func (m *TiUPInfo) GetGitRef() string

func (*TiUPInfo) GetGo

func (m *TiUPInfo) GetGo() string

func (*TiUPInfo) GetOs

func (m *TiUPInfo) GetOs() string

func (*TiUPInfo) GetTiUPVersion

func (m *TiUPInfo) GetTiUPVersion() string

func (*TiUPInfo) GetVerName

func (m *TiUPInfo) GetVerName() string

func (*TiUPInfo) Marshal

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

func (*TiUPInfo) MarshalTo

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

func (*TiUPInfo) MarshalToSizedBuffer

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

func (*TiUPInfo) ProtoMessage

func (*TiUPInfo) ProtoMessage()

func (*TiUPInfo) Reset

func (m *TiUPInfo) Reset()

func (*TiUPInfo) Size

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

func (*TiUPInfo) String

func (m *TiUPInfo) String() string

func (*TiUPInfo) Unmarshal

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

func (*TiUPInfo) XXX_DiscardUnknown

func (m *TiUPInfo) XXX_DiscardUnknown()

func (*TiUPInfo) XXX_Marshal

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

func (*TiUPInfo) XXX_Merge

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

func (*TiUPInfo) XXX_Size

func (m *TiUPInfo) XXX_Size() int

func (*TiUPInfo) XXX_Unmarshal

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

type TiUPReport

type TiUPReport struct {
	Command              string   `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	Tag                  string   `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
	TakeMilliseconds     uint64   `protobuf:"varint,3,opt,name=take_milliseconds,json=takeMilliseconds,proto3" json:"take_milliseconds,omitempty"`
	ExitCode             int32    `protobuf:"varint,4,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	CustomMirror         bool     `protobuf:"varint,5,opt,name=custom_mirror,json=customMirror,proto3" json:"custom_mirror,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TiUPReport) Descriptor

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

func (*TiUPReport) GetCommand

func (m *TiUPReport) GetCommand() string

func (*TiUPReport) GetCustomMirror

func (m *TiUPReport) GetCustomMirror() bool

func (*TiUPReport) GetExitCode

func (m *TiUPReport) GetExitCode() int32

func (*TiUPReport) GetTag

func (m *TiUPReport) GetTag() string

func (*TiUPReport) GetTakeMilliseconds

func (m *TiUPReport) GetTakeMilliseconds() uint64

func (*TiUPReport) Marshal

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

func (*TiUPReport) MarshalTo

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

func (*TiUPReport) MarshalToSizedBuffer

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

func (*TiUPReport) ProtoMessage

func (*TiUPReport) ProtoMessage()

func (*TiUPReport) Reset

func (m *TiUPReport) Reset()

func (*TiUPReport) Size

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

func (*TiUPReport) String

func (m *TiUPReport) String() string

func (*TiUPReport) Unmarshal

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

func (*TiUPReport) XXX_DiscardUnknown

func (m *TiUPReport) XXX_DiscardUnknown()

func (*TiUPReport) XXX_Marshal

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

func (*TiUPReport) XXX_Merge

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

func (*TiUPReport) XXX_Size

func (m *TiUPReport) XXX_Size() int

func (*TiUPReport) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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