common

package
v0.0.0-...-c4c90f7 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

View Source
const MAX_RETRY = 3

Variables

View Source
var ERROR_BACKOFF map[ErrorCode]int64
View Source
var ERROR_RETRY_TYPE map[ErrorCode]RetryType
View Source
var GalaxyEmqServiceException_Details_DEFAULT string
View Source
var GalaxyEmqServiceException_ErrMsg_DEFAULT string
View Source
var GalaxyEmqServiceException_ErrorCode_DEFAULT int32
View Source
var GalaxyEmqServiceException_QueueName_DEFAULT string
View Source
var GalaxyEmqServiceException_RequestId_DEFAULT string
View Source
var GoUnusedProtection__ int
View Source
var Version_Details_DEFAULT string = ""

Functions

This section is empty.

Types

type EMQBaseService

type EMQBaseService interface {
	// Get EMQ service version;
	//
	GetServiceVersion() (r *Version, err error)
	// Check the version compatibility between client and server;
	//
	//
	// Parameters:
	//  - ClientVersion
	ValidClientVersion(clientVersion *Version) (err error)
}

type EMQBaseServiceClient

type EMQBaseServiceClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

func NewEMQBaseServiceClientProtocol

func NewEMQBaseServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *EMQBaseServiceClient

func (*EMQBaseServiceClient) GetServiceVersion

func (p *EMQBaseServiceClient) GetServiceVersion() (r *Version, err error)

Get EMQ service version;

func (*EMQBaseServiceClient) ValidClientVersion

func (p *EMQBaseServiceClient) ValidClientVersion(clientVersion *Version) (err error)

Check the version compatibility between client and server;

Parameters:

  • ClientVersion

type EMQBaseServiceProcessor

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

func NewEMQBaseServiceProcessor

func NewEMQBaseServiceProcessor(handler EMQBaseService) *EMQBaseServiceProcessor

func (*EMQBaseServiceProcessor) AddToProcessorMap

func (p *EMQBaseServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*EMQBaseServiceProcessor) GetProcessorFunction

func (p *EMQBaseServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*EMQBaseServiceProcessor) Process

func (p *EMQBaseServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*EMQBaseServiceProcessor) ProcessorMap

type ErrorCode

type ErrorCode int64

List of ErrorCode.

const (
	ErrorCode_INVALID_ACTION          ErrorCode = 1
	ErrorCode_INVALID_ATTRIBUTE       ErrorCode = 2
	ErrorCode_QUEUE_DELETED_RECENTLY  ErrorCode = 3
	ErrorCode_QUEUE_EXIST             ErrorCode = 4
	ErrorCode_QUEUE_NAME_MISSING      ErrorCode = 5
	ErrorCode_QUEUE_NOT_EXIST         ErrorCode = 6
	ErrorCode_QUEUE_INUSE             ErrorCode = 7
	ErrorCode_QUEUE_URI_CONFLICT      ErrorCode = 8
	ErrorCode_INVALID_INDEX_ID        ErrorCode = 9
	ErrorCode_MESSAGE_BODY_MISSING    ErrorCode = 10
	ErrorCode_INVALID_RECEIPT_HANDLE  ErrorCode = 11
	ErrorCode_INDEX_NOT_UNIQUE        ErrorCode = 12
	ErrorCode_PERMISSION_DENIED       ErrorCode = 13
	ErrorCode_REQUEST_LENGTH_EXCEEDED ErrorCode = 34
	ErrorCode_BAD_REQUEST             ErrorCode = 35
	ErrorCode_INTERNAL_ERROR          ErrorCode = 14
	ErrorCode_PARTITION_NOT_EXIST     ErrorCode = 15
	ErrorCode_PARTITION_NOT_RUNNING   ErrorCode = 16
	ErrorCode_QUEUE_NOT_CACHED        ErrorCode = 17
	ErrorCode_PARTITION_NOT_SERVING   ErrorCode = 18
	ErrorCode_TTRANSPORT_ERROR        ErrorCode = 19
	ErrorCode_QUOTA_EXCEEDED          ErrorCode = 20
	ErrorCode_QUOTA_NOT_EXIST         ErrorCode = 21
	ErrorCode_QUOTA_LOCK_FAILED       ErrorCode = 22
	ErrorCode_UNKNOWN                 ErrorCode = 30
)

func ErrorCodeFromString

func ErrorCodeFromString(s string) (ErrorCode, error)

func ErrorCodePtr

func ErrorCodePtr(v ErrorCode) *ErrorCode

func (ErrorCode) String

func (p ErrorCode) String() string

type GalaxyEmqServiceException

type GalaxyEmqServiceException struct {
	ErrorCode *int32  `thrift:"errorCode,1" json:"errorCode"`
	ErrMsg    *string `thrift:"errMsg,2" json:"errMsg"`
	Details   *string `thrift:"details,3" json:"details"`
	RequestId *string `thrift:"requestId,4" json:"requestId"`
	QueueName *string `thrift:"queueName,5" json:"queueName"`
}
var GetServiceVersionResult_E_DEFAULT *GalaxyEmqServiceException
var ValidClientVersionResult_E_DEFAULT *GalaxyEmqServiceException

func NewGalaxyEmqServiceException

func NewGalaxyEmqServiceException() *GalaxyEmqServiceException

func (*GalaxyEmqServiceException) Error

func (p *GalaxyEmqServiceException) Error() string

func (*GalaxyEmqServiceException) GetDetails

func (p *GalaxyEmqServiceException) GetDetails() string

func (*GalaxyEmqServiceException) GetErrMsg

func (p *GalaxyEmqServiceException) GetErrMsg() string

func (*GalaxyEmqServiceException) GetErrorCode

func (p *GalaxyEmqServiceException) GetErrorCode() int32

func (*GalaxyEmqServiceException) GetQueueName

func (p *GalaxyEmqServiceException) GetQueueName() string

func (*GalaxyEmqServiceException) GetRequestId

func (p *GalaxyEmqServiceException) GetRequestId() string

func (*GalaxyEmqServiceException) IsSetDetails

func (p *GalaxyEmqServiceException) IsSetDetails() bool

func (*GalaxyEmqServiceException) IsSetErrMsg

func (p *GalaxyEmqServiceException) IsSetErrMsg() bool

func (*GalaxyEmqServiceException) IsSetErrorCode

func (p *GalaxyEmqServiceException) IsSetErrorCode() bool

func (*GalaxyEmqServiceException) IsSetQueueName

func (p *GalaxyEmqServiceException) IsSetQueueName() bool

func (*GalaxyEmqServiceException) IsSetRequestId

func (p *GalaxyEmqServiceException) IsSetRequestId() bool

func (*GalaxyEmqServiceException) Read

func (*GalaxyEmqServiceException) ReadField1

func (p *GalaxyEmqServiceException) ReadField1(iprot thrift.TProtocol) error

func (*GalaxyEmqServiceException) ReadField2

func (p *GalaxyEmqServiceException) ReadField2(iprot thrift.TProtocol) error

func (*GalaxyEmqServiceException) ReadField3

func (p *GalaxyEmqServiceException) ReadField3(iprot thrift.TProtocol) error

func (*GalaxyEmqServiceException) ReadField4

func (p *GalaxyEmqServiceException) ReadField4(iprot thrift.TProtocol) error

func (*GalaxyEmqServiceException) ReadField5

func (p *GalaxyEmqServiceException) ReadField5(iprot thrift.TProtocol) error

func (*GalaxyEmqServiceException) String

func (p *GalaxyEmqServiceException) String() string

func (*GalaxyEmqServiceException) Write

type GetServiceVersionArgs

type GetServiceVersionArgs struct {
}

func NewGetServiceVersionArgs

func NewGetServiceVersionArgs() *GetServiceVersionArgs

func (*GetServiceVersionArgs) Read

func (*GetServiceVersionArgs) String

func (p *GetServiceVersionArgs) String() string

func (*GetServiceVersionArgs) Write

func (p *GetServiceVersionArgs) Write(oprot thrift.TProtocol) error

type GetServiceVersionResult

type GetServiceVersionResult struct {
	Success *Version                   `thrift:"success,0" json:"success"`
	E       *GalaxyEmqServiceException `thrift:"e,1" json:"e"`
}

func NewGetServiceVersionResult

func NewGetServiceVersionResult() *GetServiceVersionResult

func (*GetServiceVersionResult) GetE

func (*GetServiceVersionResult) GetSuccess

func (p *GetServiceVersionResult) GetSuccess() *Version

func (*GetServiceVersionResult) IsSetE

func (p *GetServiceVersionResult) IsSetE() bool

func (*GetServiceVersionResult) IsSetSuccess

func (p *GetServiceVersionResult) IsSetSuccess() bool

func (*GetServiceVersionResult) Read

func (*GetServiceVersionResult) ReadField0

func (p *GetServiceVersionResult) ReadField0(iprot thrift.TProtocol) error

func (*GetServiceVersionResult) ReadField1

func (p *GetServiceVersionResult) ReadField1(iprot thrift.TProtocol) error

func (*GetServiceVersionResult) String

func (p *GetServiceVersionResult) String() string

func (*GetServiceVersionResult) Write

type RetryType

type RetryType int64
const (
	RetryType_SAFE   RetryType = 0
	RetryType_UNSAFE RetryType = 1
	RetryType_UNSURE RetryType = 2
)

func RetryTypeFromString

func RetryTypeFromString(s string) (RetryType, error)

func RetryTypePtr

func RetryTypePtr(v RetryType) *RetryType

func (RetryType) String

func (p RetryType) String() string

type ValidClientVersionArgs

type ValidClientVersionArgs struct {
	ClientVersion *Version `thrift:"clientVersion,1" json:"clientVersion"`
}

func NewValidClientVersionArgs

func NewValidClientVersionArgs() *ValidClientVersionArgs

func (*ValidClientVersionArgs) GetClientVersion

func (p *ValidClientVersionArgs) GetClientVersion() *Version

func (*ValidClientVersionArgs) IsSetClientVersion

func (p *ValidClientVersionArgs) IsSetClientVersion() bool

func (*ValidClientVersionArgs) Read

func (*ValidClientVersionArgs) ReadField1

func (p *ValidClientVersionArgs) ReadField1(iprot thrift.TProtocol) error

func (*ValidClientVersionArgs) String

func (p *ValidClientVersionArgs) String() string

func (*ValidClientVersionArgs) Write

func (p *ValidClientVersionArgs) Write(oprot thrift.TProtocol) error

type ValidClientVersionResult

type ValidClientVersionResult struct {
	E *GalaxyEmqServiceException `thrift:"e,1" json:"e"`
}

func NewValidClientVersionResult

func NewValidClientVersionResult() *ValidClientVersionResult

func (*ValidClientVersionResult) GetE

func (*ValidClientVersionResult) IsSetE

func (p *ValidClientVersionResult) IsSetE() bool

func (*ValidClientVersionResult) Read

func (*ValidClientVersionResult) ReadField1

func (p *ValidClientVersionResult) ReadField1(iprot thrift.TProtocol) error

func (*ValidClientVersionResult) String

func (p *ValidClientVersionResult) String() string

func (*ValidClientVersionResult) Write

type Version

type Version struct {
	Major    int32  `thrift:"major,1,required" json:"major"`
	Minor    int32  `thrift:"minor,2,required" json:"minor"`
	Revision int32  `thrift:"revision,3,required" json:"revision"`
	Date     string `thrift:"date,4,required" json:"date"`
	Details  string `thrift:"details,5" json:"details"`
}
var GetServiceVersionResult_Success_DEFAULT *Version
var ValidClientVersionArgs_ClientVersion_DEFAULT *Version

func NewVersion

func NewVersion() *Version

func (*Version) GetDate

func (p *Version) GetDate() string

func (*Version) GetDetails

func (p *Version) GetDetails() string

func (*Version) GetMajor

func (p *Version) GetMajor() int32

func (*Version) GetMinor

func (p *Version) GetMinor() int32

func (*Version) GetRevision

func (p *Version) GetRevision() int32

func (*Version) IsSetDetails

func (p *Version) IsSetDetails() bool

func (*Version) Read

func (p *Version) Read(iprot thrift.TProtocol) error

func (*Version) ReadField1

func (p *Version) ReadField1(iprot thrift.TProtocol) error

func (*Version) ReadField2

func (p *Version) ReadField2(iprot thrift.TProtocol) error

func (*Version) ReadField3

func (p *Version) ReadField3(iprot thrift.TProtocol) error

func (*Version) ReadField4

func (p *Version) ReadField4(iprot thrift.TProtocol) error

func (*Version) ReadField5

func (p *Version) ReadField5(iprot thrift.TProtocol) error

func (*Version) String

func (p *Version) String() string

func (*Version) Write

func (p *Version) Write(oprot thrift.TProtocol) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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