api

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Period_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "WEEK",
		2: "DAY",
	}
	Period_value = map[string]int32{
		"UNSPECIFIED": 0,
		"WEEK":        1,
		"DAY":         2,
	}
)

Enum value maps for Period.

View Source
var File_infra_appengine_statsui_api_service_proto protoreflect.FileDescriptor

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterStatsServer

func RegisterStatsServer(s prpc.Registrar, srv StatsServer)

Types

type DataSet

type DataSet struct {

	// A set of data.  This is a map of dates (in YYYY-MM-DD format) to numbers.
	Data map[string]float32 `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DataSet) Descriptor deprecated

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

Deprecated: Use DataSet.ProtoReflect.Descriptor instead.

func (*DataSet) GetData

func (x *DataSet) GetData() map[string]float32

func (*DataSet) ProtoMessage

func (*DataSet) ProtoMessage()

func (*DataSet) ProtoReflect

func (x *DataSet) ProtoReflect() protoreflect.Message

func (*DataSet) Reset

func (x *DataSet) Reset()

func (*DataSet) String

func (x *DataSet) String() string

type FetchMetricsRequest

type FetchMetricsRequest struct {

	// Data source to pull the metrics from.
	// See datasources.yaml for valid values.
	DataSource string `protobuf:"bytes,1,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"`
	// Time period to fetch.
	Period Period `protobuf:"varint,2,opt,name=period,proto3,enum=statsui.Period" json:"period,omitempty"`
	// Dates to fetch.  This should align to the period.
	// Dates should be specified in YYYY-MM-DD format.
	Dates []string `protobuf:"bytes,3,rep,name=dates,proto3" json:"dates,omitempty"`
	// Metrics to fetch.  These are specific to th datasource.
	// This is required.  If no metrics are specified an error is returned.
	Metrics []string `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchMetricsRequest) Descriptor deprecated

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

Deprecated: Use FetchMetricsRequest.ProtoReflect.Descriptor instead.

func (*FetchMetricsRequest) GetDataSource

func (x *FetchMetricsRequest) GetDataSource() string

func (*FetchMetricsRequest) GetDates

func (x *FetchMetricsRequest) GetDates() []string

func (*FetchMetricsRequest) GetMetrics

func (x *FetchMetricsRequest) GetMetrics() []string

func (*FetchMetricsRequest) GetPeriod

func (x *FetchMetricsRequest) GetPeriod() Period

func (*FetchMetricsRequest) ProtoMessage

func (*FetchMetricsRequest) ProtoMessage()

func (*FetchMetricsRequest) ProtoReflect

func (x *FetchMetricsRequest) ProtoReflect() protoreflect.Message

func (*FetchMetricsRequest) Reset

func (x *FetchMetricsRequest) Reset()

func (*FetchMetricsRequest) String

func (x *FetchMetricsRequest) String() string

type FetchMetricsResponse

type FetchMetricsResponse struct {

	// The various sections fetched for the given metrics.
	Sections []*Section `protobuf:"bytes,1,rep,name=sections,proto3" json:"sections,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchMetricsResponse) Descriptor deprecated

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

Deprecated: Use FetchMetricsResponse.ProtoReflect.Descriptor instead.

func (*FetchMetricsResponse) GetSections

func (x *FetchMetricsResponse) GetSections() []*Section

func (*FetchMetricsResponse) ProtoMessage

func (*FetchMetricsResponse) ProtoMessage()

func (*FetchMetricsResponse) ProtoReflect

func (x *FetchMetricsResponse) ProtoReflect() protoreflect.Message

func (*FetchMetricsResponse) Reset

func (x *FetchMetricsResponse) Reset()

func (*FetchMetricsResponse) String

func (x *FetchMetricsResponse) String() string

type Metric

type Metric struct {

	// Name of the metric.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Either data or sections should be defined, but not both.
	// Set of data for the metric.
	Data *DataSet `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Sections if the data is grouped by label.
	Sections map[string]*DataSet `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Metric) Descriptor deprecated

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

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetData

func (x *Metric) GetData() *DataSet

func (*Metric) GetName

func (x *Metric) GetName() string

func (*Metric) GetSections

func (x *Metric) GetSections() map[string]*DataSet

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

func (x *Metric) ProtoReflect() protoreflect.Message

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

type Period

type Period int32

Enumeration to specify the time period to fetch

const (
	Period_UNSPECIFIED Period = 0
	Period_WEEK        Period = 1
	Period_DAY         Period = 2
)

func (Period) Descriptor

func (Period) Descriptor() protoreflect.EnumDescriptor

func (Period) Enum

func (x Period) Enum() *Period

func (Period) EnumDescriptor deprecated

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

Deprecated: Use Period.Descriptor instead.

func (Period) Number

func (x Period) Number() protoreflect.EnumNumber

func (Period) String

func (x Period) String() string

func (Period) Type

func (Period) Type() protoreflect.EnumType

type Section

type Section struct {

	// Name, or grouping label for the metrics.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Metrics fetched.
	Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*Section) Descriptor deprecated

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

Deprecated: Use Section.ProtoReflect.Descriptor instead.

func (*Section) GetMetrics

func (x *Section) GetMetrics() []*Metric

func (*Section) GetName

func (x *Section) GetName() string

func (*Section) ProtoMessage

func (*Section) ProtoMessage()

func (*Section) ProtoReflect

func (x *Section) ProtoReflect() protoreflect.Message

func (*Section) Reset

func (x *Section) Reset()

func (*Section) String

func (x *Section) String() string

type StatsClient

type StatsClient interface {
	// FetchMetrics is called by the frontend to fetch metrics from the database.
	FetchMetrics(ctx context.Context, in *FetchMetricsRequest, opts ...grpc.CallOption) (*FetchMetricsResponse, error)
}

StatsClient is the client API for Stats service.

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

func NewStatsClient

func NewStatsClient(cc grpc.ClientConnInterface) StatsClient

func NewStatsPRPCClient

func NewStatsPRPCClient(client *prpc.Client) StatsClient

type StatsServer

type StatsServer interface {
	// FetchMetrics is called by the frontend to fetch metrics from the database.
	FetchMetrics(context.Context, *FetchMetricsRequest) (*FetchMetricsResponse, error)
}

StatsServer is the server API for Stats service.

type UnimplementedStatsServer

type UnimplementedStatsServer struct {
}

UnimplementedStatsServer can be embedded to have forward compatible implementations.

func (*UnimplementedStatsServer) FetchMetrics

Jump to

Keyboard shortcuts

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