msg

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	ReqType  RequestType
	ID       uint64
	Msg      sdk.Msg
	Retry    uint64
	MaxRetry uint64
}

Request is the struct for sending a request to the sender worker.

func NewRequest

func NewRequest(reqType RequestType, id uint64, msg sdk.Msg, maxRetry uint64) Request

NewRequest creates a new request object.

func (Request) IncreaseRetry

func (req Request) IncreaseRetry() Request

IncreaseRetry increases the retry count of the request and returns a new request.

type RequestType

type RequestType int

RequestType represents the type of the request.

const (
	RequestTypeCreateGroupRound1 RequestType = iota
	RequestTypeCreateGroupRound2
	RequestTypeCreateGroupConfirm
	RequestTypeCreateGroupComplain
	RequestTypeUpdateDE
	RequestTypeSubmitSignature
)

type Response

type Response struct {
	Request Request
	Success bool
	TxHash  string
	Err     error
}

Response is the struct for identifying the result of the request.

func NewResponse

func NewResponse(req Request, success bool, txHash string, err error) Response

NewResponse creates a new response object.

type ResponseReceiver

type ResponseReceiver struct {
	ReqType    RequestType
	ResponseCh chan Response
}

ResponseReceiver is the struct for receiving the response from the sender worker.

func NewResponseReceiver

func NewResponseReceiver(reqType RequestType) ResponseReceiver

NewResponseReceiver creates a new response receiver for a request type.

Jump to

Keyboard shortcuts

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