wrapper

package
v4.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultSkipEndpoints contains list of endpoints that not evaluted by wrapper
	DefaultSkipEndpoints = []string{"Meter.Metrics", "Health.Live", "Health.Ready", "Health.Version"}
)

Functions

func NewCallWrapper

func NewCallWrapper(opts ...Option) client.CallWrapper

NewCallWrapper create new call wrapper

func NewClientWrapper

func NewClientWrapper(opts ...Option) client.Wrapper

NewClientWrapper create new client wrapper

func NewServerHandlerWrapper

func NewServerHandlerWrapper(opts ...Option) server.HandlerWrapper

NewServerHandlerWrapper create new server handler wrapper

Types

type Option

type Option func(*Options)

Option func signature

func Meter

func Meter(m meter.Meter) Option

Meter passes meter

func ServiceID

func ServiceID(id string) Option

ServiceID passes service id to meter label

func ServiceName

func ServiceName(name string) Option

ServiceName passes service name to meter label

func ServiceVersion

func ServiceVersion(version string) Option

ServiceVersion passes service version to meter label

func SkipEndoints

func SkipEndoints(eps ...string) Option

SkipEndoints add endpoint to skip

type Options

type Options struct {
	Meter meter.Meter

	SkipEndpoints []string
	// contains filtered or unexported fields
}

Options struct

func NewOptions

func NewOptions(opts ...Option) Options

NewOptions creates new Options struct

Jump to

Keyboard shortcuts

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