response

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execute

type Execute struct {
	Type       string            `json:"type,omitempty"`
	RequestID  string            `json:"request_id,omitempty"`
	FunctionID string            `json:"function_id,omitempty"`
	From       peer.ID           `json:"from,omitempty"`
	Code       codes.Code        `json:"code,omitempty"`
	Results    execute.ResultMap `json:"results,omitempty"`
	Cluster    execute.Cluster   `json:"cluster,omitempty"`

	PBFT PBFTResultInfo `json:"pbft,omitempty"`
	// Signed digest of the response.
	Signature string `json:"signature,omitempty"`

	// Used to communicate the reason for failure to the user.
	Message string `json:"message,omitempty"`
}

Execute describes the response to the `MessageExecute` message.

func (*Execute) Sign

func (e *Execute) Sign(key crypto.PrivKey) error

func (Execute) VerifySignature

func (e Execute) VerifySignature(key crypto.PubKey) error

type FormCluster

type FormCluster struct {
	Type      string         `json:"type,omitempty"`
	RequestID string         `json:"request_id,omitempty"`
	From      peer.ID        `json:"from,omitempty"`
	Code      codes.Code     `json:"code,omitempty"`
	Consensus consensus.Type `json:"consensus,omitempty"`
}

FormCluster describes the `MessageFormClusteRr` response.

type Health

type Health struct {
	Type string  `json:"type,omitempty"`
	From peer.ID `json:"from,omitempty"`
	Code int     `json:"code,omitempty"`
}

Health describes the message sent as a health ping.

type InstallFunction

type InstallFunction struct {
	Type    string     `json:"type,omitempty"`
	From    peer.ID    `json:"from,omitempty"`
	Code    codes.Code `json:"code,omitempty"`
	Message string     `json:"message,omitempty"`
	CID     string     `json:"cid,omitempty"`
}

InstallFunction describes the response to the `MessageInstallFunction` message.

type PBFTResultInfo

type PBFTResultInfo struct {
	View             uint      `json:"view"`
	RequestTimestamp time.Time `json:"request_timestamp,omitempty"`
	Replica          peer.ID   `json:"replica,omitempty"`
}

type RollCall

type RollCall struct {
	Type       string     `json:"type,omitempty"`
	From       peer.ID    `json:"from,omitempty"`
	Code       codes.Code `json:"code,omitempty"`
	Role       string     `json:"role,omitempty"`
	FunctionID string     `json:"function_id,omitempty"`
	RequestID  string     `json:"request_id,omitempty"`
}

RollCall describes the `MessageRollCall` response payload.

Jump to

Keyboard shortcuts

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