carbon

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package carbon is a generated protocol buffer package.

It is generated from these files:

carbon.proto

It has these top-level messages:

Point
Metric
Payload

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCarbonServer

func RegisterCarbonServer(s *grpc.Server, srv CarbonServer)

Types

type CarbonClient

type CarbonClient interface {
	// Store parses request, sends them to internal queue and returns response.
	// Data may be lost during server restart.
	Store(ctx context.Context, in *Payload, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
	// StoreSync returns response only after data has written to drive.
	StoreSync(ctx context.Context, in *Payload, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
}

func NewCarbonClient

func NewCarbonClient(cc *grpc.ClientConn) CarbonClient

type CarbonServer

type CarbonServer interface {
	// Store parses request, sends them to internal queue and returns response.
	// Data may be lost during server restart.
	Store(context.Context, *Payload) (*google_protobuf.Empty, error)
	// StoreSync returns response only after data has written to drive.
	StoreSync(context.Context, *Payload) (*google_protobuf.Empty, error)
}

type Metric

type Metric struct {
	Metric string   `protobuf:"bytes,1,opt,name=metric" json:"metric,omitempty"`
	Points []*Point `protobuf:"bytes,2,rep,name=points" json:"points,omitempty"`
}

func (*Metric) Descriptor

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

func (*Metric) GetMetric

func (m *Metric) GetMetric() string

func (*Metric) GetPoints

func (m *Metric) GetPoints() []*Point

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) Reset

func (m *Metric) Reset()

func (*Metric) String

func (m *Metric) String() string

type Payload

type Payload struct {
	Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
}

func (*Payload) Descriptor

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

func (*Payload) GetMetrics

func (m *Payload) GetMetrics() []*Metric

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) String

func (m *Payload) String() string

type Point

type Point struct {
	Timestamp uint32  `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Value     float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`
}

func (*Point) Descriptor

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

func (*Point) GetTimestamp

func (m *Point) GetTimestamp() uint32

func (*Point) GetValue

func (m *Point) GetValue() float64

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) Reset

func (m *Point) Reset()

func (*Point) String

func (m *Point) String() string

Jump to

Keyboard shortcuts

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