Versions in this module Expand all Collapse all v0 v0.1.1 Jun 23, 2025 v0.1.0 Jun 9, 2025 Changes in this version + const APIPathPrefix + var File_pbf_metrics_api_proto protoreflect.FileDescriptor + var File_pbf_metrics_common_proto protoreflect.FileDescriptor + var File_pbf_metrics_counter_proto protoreflect.FileDescriptor + var File_pbf_metrics_gauge_proto protoreflect.FileDescriptor + var File_pbf_metrics_histogram_proto protoreflect.FileDescriptor + func WriteError(resp http.ResponseWriter, err error) + type API interface + Counter func(context.Context, *CounterI) (*CounterO, error) + Gauge func(context.Context, *GaugeI) (*GaugeO, error) + Histogram func(context.Context, *HistogramI) (*HistogramO, error) + func NewAPIJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) API + func NewAPIProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) API + type Action struct + Labels map[string]string + Metric string + Number float64 + func (*Action) Descriptor() ([]byte, []int) + func (*Action) ProtoMessage() + func (x *Action) GetLabels() map[string]string + func (x *Action) GetMetric() string + func (x *Action) GetNumber() float64 + func (x *Action) ProtoReflect() protoreflect.Message + func (x *Action) Reset() + func (x *Action) String() string + type CounterI struct + Action []*Action + func (*CounterI) Descriptor() ([]byte, []int) + func (*CounterI) ProtoMessage() + func (x *CounterI) GetAction() []*Action + func (x *CounterI) ProtoReflect() protoreflect.Message + func (x *CounterI) Reset() + func (x *CounterI) String() string + type CounterO struct + Result []*Result + func (*CounterO) Descriptor() ([]byte, []int) + func (*CounterO) ProtoMessage() + func (x *CounterO) GetResult() []*Result + func (x *CounterO) ProtoReflect() protoreflect.Message + func (x *CounterO) Reset() + func (x *CounterO) String() string + type GaugeI struct + Action []*Action + func (*GaugeI) Descriptor() ([]byte, []int) + func (*GaugeI) ProtoMessage() + func (x *GaugeI) GetAction() []*Action + func (x *GaugeI) ProtoReflect() protoreflect.Message + func (x *GaugeI) Reset() + func (x *GaugeI) String() string + type GaugeO struct + Result []*Result + func (*GaugeO) Descriptor() ([]byte, []int) + func (*GaugeO) ProtoMessage() + func (x *GaugeO) GetResult() []*Result + func (x *GaugeO) ProtoReflect() protoreflect.Message + func (x *GaugeO) Reset() + func (x *GaugeO) String() string + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type HistogramI struct + Action []*Action + func (*HistogramI) Descriptor() ([]byte, []int) + func (*HistogramI) ProtoMessage() + func (x *HistogramI) GetAction() []*Action + func (x *HistogramI) ProtoReflect() protoreflect.Message + func (x *HistogramI) Reset() + func (x *HistogramI) String() string + type HistogramO struct + Result []*Result + func (*HistogramO) Descriptor() ([]byte, []int) + func (*HistogramO) ProtoMessage() + func (x *HistogramO) GetResult() []*Result + func (x *HistogramO) ProtoReflect() protoreflect.Message + func (x *HistogramO) Reset() + func (x *HistogramO) String() string + type Reason struct + Info string + Kind string + func (*Reason) Descriptor() ([]byte, []int) + func (*Reason) ProtoMessage() + func (x *Reason) GetInfo() string + func (x *Reason) GetKind() string + func (x *Reason) ProtoReflect() protoreflect.Message + func (x *Reason) Reset() + func (x *Reason) String() string + type Result struct + Reason *Reason + Status string + func (*Result) Descriptor() ([]byte, []int) + func (*Result) ProtoMessage() + func (x *Result) GetReason() *Reason + func (x *Result) GetStatus() string + func (x *Result) ProtoReflect() protoreflect.Message + func (x *Result) Reset() + func (x *Result) String() string + type TwirpServer interface + PathPrefix func() string + ProtocGenTwirpVersion func() string + ServiceDescriptor func() ([]byte, int) + func NewAPIServer(svc API, opts ...interface{}) TwirpServer