stats

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: Apache-2.0 Imports: 16 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

Package stats is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStatsHandler added in v0.4.0

func RegisterStatsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterStatsHandler registers the http handlers for service Stats to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterStatsHandlerFromEndpoint added in v0.4.0

func RegisterStatsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterStatsHandlerFromEndpoint is same as RegisterStatsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

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) GetContainerId added in v0.4.0

func (m *StatsEntry) GetContainerId() string

func (*StatsEntry) GetContainerImage added in v0.4.0

func (m *StatsEntry) GetContainerImage() string

func (*StatsEntry) GetContainerName added in v0.4.0

func (m *StatsEntry) GetContainerName() string

func (*StatsEntry) GetCpu added in v0.4.0

func (m *StatsEntry) GetCpu() float64

func (*StatsEntry) GetDatacenter added in v0.4.0

func (m *StatsEntry) GetDatacenter() string

func (*StatsEntry) GetHost added in v0.4.0

func (m *StatsEntry) GetHost() string

func (*StatsEntry) GetIoRead added in v0.4.0

func (m *StatsEntry) GetIoRead() float64

func (*StatsEntry) GetIoWrite added in v0.4.0

func (m *StatsEntry) GetIoWrite() float64

func (*StatsEntry) GetMem added in v0.4.0

func (m *StatsEntry) GetMem() float64

func (*StatsEntry) GetMemLimit added in v0.4.0

func (m *StatsEntry) GetMemLimit() float64

func (*StatsEntry) GetMemUsage added in v0.4.0

func (m *StatsEntry) GetMemUsage() float64

func (*StatsEntry) GetNetRxBytes added in v0.4.0

func (m *StatsEntry) GetNetRxBytes() float64

func (*StatsEntry) GetNetTxBytes added in v0.4.0

func (m *StatsEntry) GetNetTxBytes() float64

func (*StatsEntry) GetNodeId added in v0.4.0

func (m *StatsEntry) GetNodeId() string

func (*StatsEntry) GetNumber added in v0.4.0

func (m *StatsEntry) GetNumber() float64

func (*StatsEntry) GetServiceId added in v0.4.0

func (m *StatsEntry) GetServiceId() string

func (*StatsEntry) GetServiceName added in v0.4.0

func (m *StatsEntry) GetServiceName() string

func (*StatsEntry) GetSortType added in v0.4.0

func (m *StatsEntry) GetSortType() string

func (*StatsEntry) GetTaskId added in v0.4.0

func (m *StatsEntry) GetTaskId() string

func (*StatsEntry) GetTaskName added in v0.4.0

func (m *StatsEntry) GetTaskName() string

func (*StatsEntry) GetTime added in v0.4.0

func (m *StatsEntry) GetTime() int64

func (*StatsEntry) GetType added in v0.4.0

func (m *StatsEntry) GetType() string

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) GetDiscriminator added in v0.4.0

func (m *StatsRequest) GetDiscriminator() string

func (*StatsRequest) GetFilterContainerId added in v0.4.0

func (m *StatsRequest) GetFilterContainerId() string

func (*StatsRequest) GetFilterContainerImage added in v0.4.0

func (m *StatsRequest) GetFilterContainerImage() string

func (*StatsRequest) GetFilterContainerName added in v0.4.0

func (m *StatsRequest) GetFilterContainerName() string

func (*StatsRequest) GetFilterDatacenter added in v0.4.0

func (m *StatsRequest) GetFilterDatacenter() string

func (*StatsRequest) GetFilterHost added in v0.4.0

func (m *StatsRequest) GetFilterHost() string

func (*StatsRequest) GetFilterNodeId added in v0.4.0

func (m *StatsRequest) GetFilterNodeId() string

func (*StatsRequest) GetFilterServiceId added in v0.4.0

func (m *StatsRequest) GetFilterServiceId() string

func (*StatsRequest) GetFilterServiceIdent added in v0.4.0

func (m *StatsRequest) GetFilterServiceIdent() string

func (*StatsRequest) GetFilterServiceName added in v0.4.0

func (m *StatsRequest) GetFilterServiceName() string

func (*StatsRequest) GetFilterTaskId added in v0.4.0

func (m *StatsRequest) GetFilterTaskId() string

func (*StatsRequest) GetFilterTaskName added in v0.4.0

func (m *StatsRequest) GetFilterTaskName() string

func (*StatsRequest) GetPeriod added in v0.4.0

func (m *StatsRequest) GetPeriod() string

func (*StatsRequest) GetSince added in v0.4.0

func (m *StatsRequest) GetSince() string

func (*StatsRequest) GetStatsCpu added in v0.4.0

func (m *StatsRequest) GetStatsCpu() bool

func (*StatsRequest) GetStatsFollow added in v0.4.0

func (m *StatsRequest) GetStatsFollow() bool

func (*StatsRequest) GetStatsIo added in v0.4.0

func (m *StatsRequest) GetStatsIo() bool

func (*StatsRequest) GetStatsMem added in v0.4.0

func (m *StatsRequest) GetStatsMem() bool

func (*StatsRequest) GetStatsNet added in v0.4.0

func (m *StatsRequest) GetStatsNet() bool

func (*StatsRequest) GetTimeGroup added in v0.4.0

func (m *StatsRequest) GetTimeGroup() string

func (*StatsRequest) GetUntil added in v0.4.0

func (m *StatsRequest) GetUntil() string

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