meter_handler

package
v3.11.37 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MeterServiceName = "MeterService"
)
View Source
var (
	MeterServiceServerEndpoints = []v3.EndpointMetadata{
		{
			Name:   "MeterService.Metrics",
			Path:   "/metrics",
			Method: "GET",
			Body:   "",
			Stream: false,
		},
	}
)

Functions

func RegisterMeterServiceServer

func RegisterMeterServiceServer(s server.Server, sh MeterServiceServer, opts ...server.HandlerOption) error

Types

type Handler

type Handler struct {
	Options Options
}

func NewHandler

func NewHandler(opts ...Option) *Handler

func (*Handler) Metrics

func (h *Handler) Metrics(ctx context.Context, req *codecpb.Frame, rsp *codecpb.Frame) error

type MeterServiceClient added in v3.10.31

type MeterServiceClient interface {
	Metrics(ctx context.Context, req *codec.Frame, opts ...client.CallOption) (*codec.Frame, error)
}

func NewMeterServiceClient added in v3.10.31

func NewMeterServiceClient(name string, c client.Client) MeterServiceClient

type MeterServiceServer

type MeterServiceServer interface {
	Metrics(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
}

type Option

type Option func(*Options)

func DisableCompress added in v3.10.31

func DisableCompress(g bool) Option

func Meter

func Meter(m meter.Meter) Option

func MeterOptions

func MeterOptions(opts ...meter.Option) Option

func Name

func Name(name string) Option

type Options

type Options struct {
	Meter           meter.Meter
	Name            string
	MeterOptions    []meter.Option
	DisableCompress bool
}

func NewOptions

func NewOptions(opts ...Option) Options

Jump to

Keyboard shortcuts

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