metrics

package
v0.0.0-...-9742f5a Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetrics   = fmt.Errorf("proto: integer overflow")
)
View Source
var KeyType_name = map[int32]string{
	0: "ED25519",
	1: "RESERVED",
}
View Source
var KeyType_value = map[string]int32{
	"ED25519":  0,
	"RESERVED": 1,
}

Functions

func RegisterMetricsServer

func RegisterMetricsServer(s *grpc.Server, srv MetricsServer)

Types

type KeyType

type KeyType int32

Crypto key types

const (
	KeyType_ED25519  KeyType = 0
	KeyType_RESERVED KeyType = 1
)

func (KeyType) EnumDescriptor

func (KeyType) EnumDescriptor() ([]byte, []int)

func (KeyType) String

func (x KeyType) String() string

type MetricsClient

type MetricsClient interface {
	// MetricsPoller polls for metrics from the datacentre out to clients
	// Clients establish a connection and then send one scrape in protobuf
	// format each time the server sends a poll request
	MetricsPoller(ctx context.Context, opts ...grpc.CallOption) (Metrics_MetricsPollerClient, error)
}

MetricsClient is the client API for Metrics service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMetricsClient

func NewMetricsClient(cc *grpc.ClientConn) MetricsClient

type MetricsServer

type MetricsServer interface {
	// MetricsPoller polls for metrics from the datacentre out to clients
	// Clients establish a connection and then send one scrape in protobuf
	// format each time the server sends a poll request
	MetricsPoller(Metrics_MetricsPollerServer) error
}

MetricsServer is the server API for Metrics service.

type Metrics_MetricsPollerClient

type Metrics_MetricsPollerClient interface {
	Send(*Scrape) error
	Recv() (*empty.Empty, error)
	grpc.ClientStream
}

type Metrics_MetricsPollerServer

type Metrics_MetricsPollerServer interface {
	Send(*empty.Empty) error
	Recv() (*Scrape, error)
	grpc.ServerStream
}

type PublicKey

type PublicKey struct {
	PublicKey            []byte   `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Keytype              KeyType  `protobuf:"varint,2,opt,name=keytype,proto3,enum=metrics.KeyType" json:"keytype,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A Crytpo public key

func (*PublicKey) Descriptor

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

func (*PublicKey) GetKeytype

func (m *PublicKey) GetKeytype() KeyType

func (*PublicKey) GetPublicKey

func (m *PublicKey) GetPublicKey() []byte

func (*PublicKey) Marshal

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

func (*PublicKey) MarshalTo

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

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) Reset

func (m *PublicKey) Reset()

func (*PublicKey) Size

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

func (*PublicKey) String

func (m *PublicKey) String() string

func (*PublicKey) Unmarshal

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

func (*PublicKey) XXX_DiscardUnknown

func (m *PublicKey) XXX_DiscardUnknown()

func (*PublicKey) XXX_Marshal

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

func (*PublicKey) XXX_Merge

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

func (*PublicKey) XXX_Size

func (m *PublicKey) XXX_Size() int

func (*PublicKey) XXX_Unmarshal

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

type Scrape

type Scrape struct {
	Data      []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// Sent just once at the start of the stream
	PublicKey            *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Scrape is a wrapped pb scrape of the metrics from one metrics source in the field

func (*Scrape) Descriptor

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

func (*Scrape) GetData

func (m *Scrape) GetData() []byte

func (*Scrape) GetPublicKey

func (m *Scrape) GetPublicKey() *PublicKey

func (*Scrape) GetSignature

func (m *Scrape) GetSignature() []byte

func (*Scrape) Marshal

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

func (*Scrape) MarshalTo

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

func (*Scrape) ProtoMessage

func (*Scrape) ProtoMessage()

func (*Scrape) Reset

func (m *Scrape) Reset()

func (*Scrape) Size

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

func (*Scrape) String

func (m *Scrape) String() string

func (*Scrape) Unmarshal

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

func (*Scrape) XXX_DiscardUnknown

func (m *Scrape) XXX_DiscardUnknown()

func (*Scrape) XXX_Marshal

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

func (*Scrape) XXX_Merge

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

func (*Scrape) XXX_Size

func (m *Scrape) XXX_Size() int

func (*Scrape) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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