metrics

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package metrics is a generated protocol buffer package.

It is generated from these files:

server/pkg/metrics/metrics.proto

It has these top-level messages:

Metrics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReportAndFlushUserAction added in v1.2.4

func ReportAndFlushUserAction(action string) func(time.Time, error)

ReportAndFlushUserAction immediately reports the metric It is used in the few places we need to report metrics from the client. It handles reporting the start, finish, and error conditions of the action

func ReportUserAction added in v1.2.4

func ReportUserAction(ctx context.Context, r *Reporter, action string) func(time.Time, error)

ReportUserAction pushes the action into a queue for reporting, and reports the start, finish, and error conditions

Types

type Metrics

type Metrics struct {
	ClusterID        string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	PodID            string `protobuf:"bytes,2,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	Nodes            int64  `protobuf:"varint,3,opt,name=nodes,proto3" json:"nodes,omitempty"`
	Version          string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	Repos            int64  `protobuf:"varint,5,opt,name=repos,proto3" json:"repos,omitempty"`
	Commits          int64  `protobuf:"varint,6,opt,name=commits,proto3" json:"commits,omitempty"`
	Files            int64  `protobuf:"varint,7,opt,name=files,proto3" json:"files,omitempty"`
	Bytes            int64  `protobuf:"varint,8,opt,name=bytes,proto3" json:"bytes,omitempty"`
	Jobs             int64  `protobuf:"varint,9,opt,name=jobs,proto3" json:"jobs,omitempty"`
	Pipelines        int64  `protobuf:"varint,10,opt,name=pipelines,proto3" json:"pipelines,omitempty"`
	ArchivedCommits  int64  `protobuf:"varint,11,opt,name=archived_commits,json=archivedCommits,proto3" json:"archived_commits,omitempty"`
	CancelledCommits int64  `protobuf:"varint,12,opt,name=cancelled_commits,json=cancelledCommits,proto3" json:"cancelled_commits,omitempty"`
}

func (*Metrics) Descriptor

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

func (*Metrics) GetArchivedCommits added in v1.3.5

func (m *Metrics) GetArchivedCommits() int64

func (*Metrics) GetBytes added in v1.3.5

func (m *Metrics) GetBytes() int64

func (*Metrics) GetCancelledCommits added in v1.3.5

func (m *Metrics) GetCancelledCommits() int64

func (*Metrics) GetClusterID added in v1.3.5

func (m *Metrics) GetClusterID() string

func (*Metrics) GetCommits added in v1.3.5

func (m *Metrics) GetCommits() int64

func (*Metrics) GetFiles added in v1.3.5

func (m *Metrics) GetFiles() int64

func (*Metrics) GetJobs added in v1.3.5

func (m *Metrics) GetJobs() int64

func (*Metrics) GetNodes added in v1.3.5

func (m *Metrics) GetNodes() int64

func (*Metrics) GetPipelines added in v1.3.5

func (m *Metrics) GetPipelines() int64

func (*Metrics) GetPodID added in v1.3.5

func (m *Metrics) GetPodID() string

func (*Metrics) GetRepos added in v1.3.5

func (m *Metrics) GetRepos() int64

func (*Metrics) GetVersion added in v1.3.5

func (m *Metrics) GetVersion() string

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) Reset

func (m *Metrics) Reset()

func (*Metrics) String

func (m *Metrics) String() string

type Reporter added in v1.2.4

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

Reporter is used to submit user & cluster metrics to segment

func NewReporter added in v1.2.4

func NewReporter(clusterID string, kubeClient *kube.Client) *Reporter

NewReporter creates a new reporter and kicks off the loop to report cluster metrics

Jump to

Keyboard shortcuts

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