ext

package
v0.3.7-HA.1.9.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	E_EXT_NOT_SUPPORT     = "E_EXT_NOT_SUPPORT"
	E_BAD_TAG             = "E_BAD_TAG"
	E_INVALID_JSON_HEADER = "E_INVALID_JSON_HEADER"

	CLIENT_DISPATCH_TAG_KEY = "##client_dispatch_tag"
	TRACE_ID_KEY            = "##trace_id"
	MaxExtLen               = 65535
	ZAN_TEST_KEY            = "zan_test"
)

Variables

View Source
var JSON_HEADER_EXT_VER = ExtVer(uint8(4))

version for message has json header ext

View Source
var MAX_TAG_LEN = 100
View Source
var NO_EXT_VER = ExtVer(uint8(0))

ext versions version for message has no ext

View Source
var TAG_EXT_VER = ExtVer(uint8(2))

version for message has tag ext

Functions

func ValidateTag

func ValidateTag(beValidated string) error

Types

type ExtVer

type ExtVer uint8

type IExtContent

type IExtContent interface {
	ExtVersion() ExtVer
	GetBytes() []byte
}

type JsonHeaderExt

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

func NewJsonHeaderExt

func NewJsonHeaderExt() *JsonHeaderExt

func (*JsonHeaderExt) ExtVersion

func (self *JsonHeaderExt) ExtVersion() ExtVer

func (*JsonHeaderExt) GetBytes

func (self *JsonHeaderExt) GetBytes() []byte

func (*JsonHeaderExt) SetJsonHeaderBytes

func (self *JsonHeaderExt) SetJsonHeaderBytes(jsonExtBytes []byte)

type NoExt

type NoExt []byte

func NewNoExt

func NewNoExt() NoExt

func (NoExt) ExtVersion

func (n NoExt) ExtVersion() ExtVer

func (NoExt) GetBytes

func (n NoExt) GetBytes() []byte

type TagExt

type TagExt []byte

func NewTagExt

func NewTagExt(tagName []byte) (TagExt, error)

func (TagExt) GetTagName

func (tag TagExt) GetTagName() string

Jump to

Keyboard shortcuts

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