meta

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PrefixDest   = "destination."
	PrefixSource = "source."
	PrefixUser   = "user_def."
)
View Source
const (
	ApplicationID      = "application.id"
	GroupID            = "group.id"
	ConnnectionIP      = "connection.ip"
	ApplicationVersion = "application.version"
	ServiceName        = "service.name"
	Interface          = "interface"
	RequestHTTPMethod  = "request.http.method"
	ServiceNamespace   = "service.namespace"
	Namespace          = "namespace"

	Tracer = "tsf.tracer"
	LaneID = "lane.id"
)

Variables

This section is empty.

Functions

func DestKey

func DestKey(key string) string

func GetUserKey

func GetUserKey(key string) string

func IsIncomming

func IsIncomming(key string) (ok bool)

func IsLinkKey

func IsLinkKey(key string) (ok bool)

func IsOutgoing

func IsOutgoing(key string) (ok bool)

func IsUserKey

func IsUserKey(key string) bool

func RangeSys

func RangeSys(ctx context.Context, f func(key string, value interface{}))

func RangeUser

func RangeUser(ctx context.Context, f func(key string, value string))

func SourceKey

func SourceKey(key string) string

func Sys

func Sys(ctx context.Context, key string) (res interface{})

TODO: remove to internal package

func User

func User(ctx context.Context, key string) (res string)

func UserKey

func UserKey(key string) string

func WithSys

func WithSys(ctx context.Context, pairs ...SysPair) context.Context

func WithUser

func WithUser(ctx context.Context, pairs ...UserPair) context.Context

Types

type Context

type Context struct {
	context.Context
}

type SysMeta

type SysMeta map[string]interface{}

type SysPair

type SysPair struct {
	Key   string
	Value interface{}
}

type UserMeta

type UserMeta map[string]string

type UserPair

type UserPair struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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