common

package
v0.0.0-...-3b4426b Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventMeshCommon = struct {
	// Timeout time shared by the server
	DEFAULT_TIME_OUT_MILLS int

	// User agent
	USER_AGENT_PURPOSE_PUB string
	USER_AGENT_PURPOSE_SUB string

	// Protocol type
	CLOUD_EVENTS_PROTOCOL_NAME string
	EM_MESSAGE_PROTOCOL_NAME   string
	OPEN_MESSAGE_PROTOCOL_NAME string
}{
	DEFAULT_TIME_OUT_MILLS:     20 * 1000,
	USER_AGENT_PURPOSE_PUB:     "pub",
	USER_AGENT_PURPOSE_SUB:     "sub",
	CLOUD_EVENTS_PROTOCOL_NAME: "cloudevents",
	EM_MESSAGE_PROTOCOL_NAME:   "eventmeshmessage",
	OPEN_MESSAGE_PROTOCOL_NAME: "openmessage",
}

Functions

func GetRequestContextKey

func GetRequestContextKey(request tcp.Package) interface{}

Types

type RequestContext

type RequestContext struct {
	// contains filtered or unexported fields
}

func NewRequestContext

func NewRequestContext(key interface{}, request tcp.Package, latch int) *RequestContext

func (*RequestContext) Finish

func (r *RequestContext) Finish(message tcp.Package)

func (*RequestContext) Key

func (r *RequestContext) Key() interface{}

func (*RequestContext) Request

func (r *RequestContext) Request() tcp.Package

func (*RequestContext) Response

func (r *RequestContext) Response() tcp.Package

func (*RequestContext) SetKey

func (r *RequestContext) SetKey(key interface{})

func (*RequestContext) SetRequest

func (r *RequestContext) SetRequest(request tcp.Package)

func (*RequestContext) SetResponse

func (r *RequestContext) SetResponse(response tcp.Package)

func (*RequestContext) SetWg

func (r *RequestContext) SetWg(wg sync.WaitGroup)

func (*RequestContext) Wg

func (r *RequestContext) Wg() sync.WaitGroup

Jump to

Keyboard shortcuts

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