common

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TAG_SERVICE_NAME        = "service_name"
	TAG_SERVICE_ID          = "service_id"
	TAG_SERVICE_INSTANCE_IP = "service_instance_ip"
	TAG_SERVICE_INSTANCE_ID = "service_instance_id"
	TAG_CLIENT_UUID         = "client_uuid"
	TAG_MSP_ENV_ID          = "msp_env_id"
	TAG_MSP_ENV_TOKEN       = "msp_env_token"
	TAG_TERMINUS_KEY        = "terminus_key"
	TAG_IP                  = "ip"
	TAG_HTTP_PATH           = "http_path"
	TAG_HTTP_URL            = "http_url"

	HEADER_MSP_ENV_ID    = "x-msp-env-id"
	HEADER_MSP_ENV_TOKEN = "x-msp-env-token"

	SCOPE_MSP_ENV = "msp_env"
)
View Source
var (
	INVALID_MSP_ENV_ID    = errors.New("invalid msp.env.id tag")
	INVALID_MSP_ENV_TOKEN = errors.New("invalid msp.env.token tag")
	AUTHENTICATION_FAILED = errors.New("authentication failed, please use the correct accessKey and accessKeySecret")
)
View Source
var InterceptorType = reflect.TypeOf((*Interceptors)(nil)).Elem()

Functions

func Spans

func Spans(ctx context.Context) ([]*trace.Span, bool)

func WithSpans

func WithSpans(ctx context.Context, spans []*trace.Span) context.Context

Types

type Interceptors

type Interceptors interface {
	Authentication(next interceptor.Handler) interceptor.Handler

	SpanTagOverwrite(next interceptor.Handler) interceptor.Handler
}

Jump to

Keyboard shortcuts

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