stats

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package stats is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/api/rpc/stats/stats.proto

It has these top-level messages:

StatsRequest
StatsEntry
StatsReply

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStatsServer

func RegisterStatsServer(s *grpc.Server, srv StatsServer)

Types

type Stats

type Stats struct {
	Influx influx.Influx
}

Stats structure to implement StatsServer interface

func (*Stats) StatsQuery

func (s *Stats) StatsQuery(ctx context.Context, req *StatsRequest) (*StatsReply, error)

StatsQuery extracts stat information according to StatsRequest

type StatsClient

type StatsClient interface {
	StatsQuery(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error)
}

func NewStatsClient

func NewStatsClient(cc *grpc.ClientConn) StatsClient

type StatsEntry

type StatsEntry struct {
	// Common data
	Time           int64  `protobuf:"varint,1,opt,name=time" json:"time,omitempty"`
	Datacenter     string `protobuf:"bytes,2,opt,name=datacenter" json:"datacenter,omitempty"`
	Host           string `protobuf:"bytes,3,opt,name=host" json:"host,omitempty"`
	ContainerId    string `protobuf:"bytes,4,opt,name=container_id,json=containerId" json:"container_id,omitempty"`
	ContainerName  string `protobuf:"bytes,5,opt,name=container_name,json=containerName" json:"container_name,omitempty"`
	ContainerImage string `protobuf:"bytes,6,opt,name=container_image,json=containerImage" json:"container_image,omitempty"`
	ServiceId      string `protobuf:"bytes,7,opt,name=service_id,json=serviceId" json:"service_id,omitempty"`
	ServiceName    string `protobuf:"bytes,8,opt,name=service_name,json=serviceName" json:"service_name,omitempty"`
	TaskId         string `protobuf:"bytes,9,opt,name=task_id,json=taskId" json:"task_id,omitempty"`
	TaskName       string `protobuf:"bytes,10,opt,name=task_name,json=taskName" json:"task_name,omitempty"`
	NodeId         string `protobuf:"bytes,11,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
	Type           string `protobuf:"bytes,12,opt,name=type" json:"type,omitempty"`
	SortType       string `protobuf:"bytes,13,opt,name=sort_type,json=sortType" json:"sort_type,omitempty"`
	// CPU Metrics fields
	Number     float64 `protobuf:"fixed64,14,opt,name=number" json:"number,omitempty"`
	Cpu        float64 `protobuf:"fixed64,15,opt,name=cpu" json:"cpu,omitempty"`
	Mem        float64 `protobuf:"fixed64,16,opt,name=mem" json:"mem,omitempty"`
	MemUsage   float64 `protobuf:"fixed64,17,opt,name=mem_usage,json=memUsage" json:"mem_usage,omitempty"`
	MemLimit   float64 `protobuf:"fixed64,18,opt,name=mem_limit,json=memLimit" json:"mem_limit,omitempty"`
	IoRead     float64 `protobuf:"fixed64,19,opt,name=io_read,json=ioRead" json:"io_read,omitempty"`
	IoWrite    float64 `protobuf:"fixed64,20,opt,name=io_write,json=ioWrite" json:"io_write,omitempty"`
	NetTxBytes float64 `protobuf:"fixed64,21,opt,name=net_tx_bytes,json=netTxBytes" json:"net_tx_bytes,omitempty"`
	NetRxBytes float64 `protobuf:"fixed64,22,opt,name=net_rx_bytes,json=netRxBytes" json:"net_rx_bytes,omitempty"`
}

func (*StatsEntry) Descriptor

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

func (*StatsEntry) ProtoMessage

func (*StatsEntry) ProtoMessage()

func (*StatsEntry) Reset

func (m *StatsEntry) Reset()

func (*StatsEntry) String

func (m *StatsEntry) String() string

type StatsReply

type StatsReply struct {
	Entries []*StatsEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}

func (*StatsReply) Descriptor

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

func (*StatsReply) GetEntries

func (m *StatsReply) GetEntries() []*StatsEntry

func (StatsReply) Len

func (a StatsReply) Len() int

func (StatsReply) Less

func (a StatsReply) Less(i, j int) bool

func (*StatsReply) ProtoMessage

func (*StatsReply) ProtoMessage()

func (*StatsReply) Reset

func (m *StatsReply) Reset()

func (*StatsReply) String

func (m *StatsReply) String() string

func (StatsReply) Swap

func (a StatsReply) Swap(i, j int)

type StatsRequest

type StatsRequest struct {
	StatsCpu             bool   `protobuf:"varint,1,opt,name=stats_cpu,json=statsCpu" json:"stats_cpu,omitempty"`
	StatsMem             bool   `protobuf:"varint,2,opt,name=stats_mem,json=statsMem" json:"stats_mem,omitempty"`
	StatsIo              bool   `protobuf:"varint,3,opt,name=stats_io,json=statsIo" json:"stats_io,omitempty"`
	StatsNet             bool   `protobuf:"varint,4,opt,name=stats_net,json=statsNet" json:"stats_net,omitempty"`
	StatsFollow          bool   `protobuf:"varint,5,opt,name=stats_follow,json=statsFollow" json:"stats_follow,omitempty"`
	Discriminator        string `protobuf:"bytes,6,opt,name=discriminator" json:"discriminator,omitempty"`
	FilterDatacenter     string `protobuf:"bytes,7,opt,name=filter_datacenter,json=filterDatacenter" json:"filter_datacenter,omitempty"`
	FilterHost           string `protobuf:"bytes,8,opt,name=filter_host,json=filterHost" json:"filter_host,omitempty"`
	FilterContainerId    string `protobuf:"bytes,9,opt,name=filter_container_id,json=filterContainerId" json:"filter_container_id,omitempty"`
	FilterContainerName  string `protobuf:"bytes,10,opt,name=filter_container_name,json=filterContainerName" json:"filter_container_name,omitempty"`
	FilterContainerImage string `protobuf:"bytes,11,opt,name=filter_container_image,json=filterContainerImage" json:"filter_container_image,omitempty"`
	FilterServiceId      string `protobuf:"bytes,12,opt,name=filter_service_id,json=filterServiceId" json:"filter_service_id,omitempty"`
	FilterServiceName    string `protobuf:"bytes,13,opt,name=filter_service_name,json=filterServiceName" json:"filter_service_name,omitempty"`
	FilterTaskId         string `protobuf:"bytes,14,opt,name=filter_task_id,json=filterTaskId" json:"filter_task_id,omitempty"`
	FilterTaskName       string `protobuf:"bytes,15,opt,name=filter_task_name,json=filterTaskName" json:"filter_task_name,omitempty"`
	FilterNodeId         string `protobuf:"bytes,16,opt,name=filter_node_id,json=filterNodeId" json:"filter_node_id,omitempty"`
	FilterServiceIdent   string `protobuf:"bytes,17,opt,name=filter_service_ident,json=filterServiceIdent" json:"filter_service_ident,omitempty"`
	Since                string `protobuf:"bytes,18,opt,name=since" json:"since,omitempty"`
	Until                string `protobuf:"bytes,19,opt,name=until" json:"until,omitempty"`
	Period               string `protobuf:"bytes,20,opt,name=period" json:"period,omitempty"`
	TimeGroup            string `protobuf:"bytes,21,opt,name=time_group,json=timeGroup" json:"time_group,omitempty"`
}

func (*StatsRequest) Descriptor

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

func (*StatsRequest) ProtoMessage

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) Reset

func (m *StatsRequest) Reset()

func (*StatsRequest) String

func (m *StatsRequest) String() string

type StatsServer

type StatsServer interface {
	StatsQuery(context.Context, *StatsRequest) (*StatsReply, error)
}

Jump to

Keyboard shortcuts

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