Version: v1.2.4 Latest Latest

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

Go to latest
Published: Oct 17, 2019 License: BSD-3-Clause Imports: 1 Imported by: 0




This section is empty.


This section is empty.


func ContextWithTarsCurrent

func ContextWithTarsCurrent(ctx context.Context) context.Context

ContextWithTarsCurrent set TarsCurrent

func GetClientIPFromContext

func GetClientIPFromContext(ctx context.Context) (string, bool)

GetClientIPFromContext gets the client ip from the context.

func GetClientPortFromContext

func GetClientPortFromContext(ctx context.Context) (string, bool)

GetClientPortFromContext gets the client ip from the context.

func GetRequestContext

func GetRequestContext(ctx context.Context) (map[string]string, bool)

GetRequestContext get request context set by user.

func GetRequestStatus

func GetRequestStatus(ctx context.Context) (map[string]string, bool)

GetRequestStatus get request status set by user.

func GetResponseContext

func GetResponseContext(ctx context.Context) (map[string]string, bool)

GetResponseContext get response context set by user.

func GetResponseStatus

func GetResponseStatus(ctx context.Context) (map[string]string, bool)

GetResponseStatus get response status set by user.

func SetClientIPWithContext

func SetClientIPWithContext(ctx context.Context, IP string) bool

SetClientIPWithContext set Client IP to the tars current.

func SetClientPortWithContext

func SetClientPortWithContext(ctx context.Context, port string) bool

SetClientPortWithContext set client port to the tars current.

func SetRequestContext

func SetRequestContext(ctx context.Context, c map[string]string) bool

SetRequestContext set the request package' context .

func SetRequestStatus

func SetRequestStatus(ctx context.Context, s map[string]string) bool

SetRequestStatus set the request package' status .

func SetResponseContext

func SetResponseContext(ctx context.Context, c map[string]string) bool

SetResponseContext set the response package' context .

func SetResponseStatus

func SetResponseStatus(ctx context.Context, s map[string]string) bool

SetResponseStatus set the response package' status .


type Current

type Current struct {
	// contains filtered or unexported fields

Current contains message for the specify request. This current is used for server side.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL