appctx

package
v2.1.16+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP_CONTEXT_KEY_DB              = AppContextKey("db")
	APP_CONTEXT_KEY_CACHE           = AppContextKey("cache")
	APP_CONTEXT_KEY_APPNAME         = AppContextKey("appname")
	APP_CONTEXT_KEY_APP             = AppContextKey("application")
	APP_CONTEXT_KEY_CUR_PATH        = AppContextKey("currentpath")
	APP_CONTEXT_KEY_CUR_ROOT        = AppContextKey("currentroot")
	APP_CONTEXT_KEY_PARAMS          = AppContextKey("parameters")
	APP_CONTEXT_KEY_METADATA        = AppContextKey("metadata")
	APP_CONTEXT_KEY_TRACE           = AppContextKey("trace")
	APP_CONTEXT_KEY_REQUEST_ID      = AppContextKey("requestid")
	APP_CONTEXT_KEY_TASK_ID         = AppContextKey("taskid")
	APP_CONTEXT_KEY_TASK_NOTIFY_URL = AppContextKey("tasknotifyurl")
	APP_CONTEXT_KEY_OBJECT_ID       = AppContextKey("objectid")
	APP_CONTEXT_KEY_OBJECT_TYPE     = AppContextKey("objecttype")
)

Variables

This section is empty.

Functions

func AppContextCurrentPath

func AppContextCurrentPath(ctx context.Context) []string

func AppContextCurrentRoot

func AppContextCurrentRoot(ctx context.Context) []string

func AppContextMetadata

func AppContextMetadata(ctx context.Context) map[string]interface{}

func AppContextObjectID

func AppContextObjectID(ctx context.Context) string

func AppContextObjectType

func AppContextObjectType(ctx context.Context) string

func AppContextParams

func AppContextParams(ctx context.Context) map[string]string

func AppContextRequestId

func AppContextRequestId(ctx context.Context) string

func AppContextServiceName

func AppContextServiceName(ctx context.Context) string

func AppContextTaskId

func AppContextTaskId(ctx context.Context) string

func AppContextTaskNotifyUrl

func AppContextTaskNotifyUrl(ctx context.Context) string

func AppContextTrace

func AppContextTrace(ctx context.Context) *trace.STrace

Types

type AppContextData

type AppContextData struct {
	Trace         trace.STrace
	RequestId     string
	ObjectType    string
	ObjectId      string
	TaskId        string
	TaskNotifyUrl string
	ServiceName   string
}

func FetchAppContextData

func FetchAppContextData(ctx context.Context) AppContextData

func (*AppContextData) GetContext

func (self *AppContextData) GetContext() context.Context

func (*AppContextData) IsZero

func (self *AppContextData) IsZero() bool

type AppContextKey

type AppContextKey string

Jump to

Keyboard shortcuts

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