handler

package
v3.8.11 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MeterName = "Meter"

	MeterEndpoints = []api.Endpoint{
		{
			Name:    "Meter.Metrics",
			Path:    []string{"/metrics"},
			Method:  []string{"GET"},
			Handler: "rpc",
		},
	}
)

Functions

func NewMeterEndpoints

func NewMeterEndpoints() []api.Endpoint

func RegisterMeterServer

func RegisterMeterServer(s server.Server, sh MeterServer, opts ...server.HandlerOption) error

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(opts ...Option) *Handler

func (*Handler) Metrics

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

type MeterServer

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

type Option

type Option func(*Options)

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
}

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