request

package
v0.2.3 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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisbandCluster

type DisbandCluster struct {
	Type      string  `json:"type,omitempty"`
	From      peer.ID `json:"from,omitempty"`
	RequestID string  `json:"request_id,omitempty"`
}

DisbandCluster describes the `MessageDisbandCluster` request payload. It is sent after head node receives the leaders execution response.

type Execute

type Execute struct {
	Type  string  `json:"type,omitempty"`
	From  peer.ID `json:"from,omitempty"`
	Code  string  `json:"code,omitempty"`
	Topic string  `json:"topic,omitempty"`

	execute.Request // execute request is embedded.

	// RequestID may be set initially, if the execution request is relayed via roll-call.
	RequestID      string    `json:"request_id,omitempty"`
	ReportingPeers []peer.ID `json:"reporting_peers,omitempty"`

	// Execution request timestamp is a factor for PBFT.
	Timestamp time.Time `json:"timestamp,omitempty"`
}

Execute describes the `MessageExecute` request payload.

type FormCluster

type FormCluster struct {
	Type      string         `json:"type,omitempty"`
	From      peer.ID        `json:"from,omitempty"`
	RequestID string         `json:"request_id,omitempty"`
	Peers     []peer.ID      `json:"peers,omitempty"`
	Consensus consensus.Type `json:"consensus,omitempty"`
}

FormCluster describes the `MessageFormCluster` request payload. It is sent on clustered execution of a request.

type InstallFunction

type InstallFunction struct {
	Type        string  `json:"type,omitempty"`
	From        peer.ID `json:"from,omitempty"`
	ManifestURL string  `json:"manifest_url,omitempty"`
	CID         string  `json:"cid,omitempty"`
}

InstallFunction describes the `MessageInstallFunction` request payload.

type RollCall

type RollCall struct {
	From       peer.ID             `json:"from,omitempty"`
	Type       string              `json:"type,omitempty"`
	Origin     peer.ID             `json:"origin,omitempty"` // Origin is the peer that initiated the roll call.
	FunctionID string              `json:"function_id,omitempty"`
	RequestID  string              `json:"request_id,omitempty"`
	Consensus  consensus.Type      `json:"consensus"`
	Attributes *execute.Attributes `json:"attributes,omitempty"`
}

RollCall describes the `MessageRollCall` message payload.

Jump to

Keyboard shortcuts

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