types

package
v1.4.0-rc1.0...-90b7743 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAppChannelsAlreadyExists = errors.New("application channels already exist")

ErrAppChannelsAlreadyExists is returned when trying to join a system channel (that does not exist) when application channels already exist.

View Source
var ErrChannelAlreadyExists = errors.New("channel already exists")

ErrChannelAlreadyExists is returned when trying to join a app channel that already exists (when the system channel does not exist), or when trying to join the system channel when it already exists.

View Source
var ErrChannelNotExist = errors.New("channel does not exist")

ErrChannelNotExist is returned when trying to remove or list a channel that does not exist

View Source
var ErrChannelPendingRemoval = errors.New("channel pending removal")

ErrChannelPendingRemoval is returned when trying to remove or list a channel that is being removed.

View Source
var ErrChannelRemovalFailure = errors.New("channel removal failure")

ErrChannelRemovalFailure is returned when a removal attempt failure has been recorded.

View Source
var ErrSystemChannelExists = errors.New("system channel exists")

ErrSystemChannelExists is returned when trying to join or remove an application channel when the system channel exists.

Deprecated: system channel no longer supported

View Source
var ErrSystemChannelNotSupported = errors.New("system channel not supported")

ErrSystemChannelNotSupported is returned when trying to join with a system channel config block.

Functions

This section is empty.

Types

type ChannelInfo

type ChannelInfo struct {
	// The channel name.
	Name string `json:"name"`
	// The channel relative URL (no Host:Port, only path), e.g.: "/participation/v1/channels/my-channel".
	URL string `json:"url"`
	// Whether the orderer is a “consenter”, ”follower”, or "config-tracker" of
	// the cluster for this channel.
	// For non cluster consensus types (solo) it is "other".
	// Possible values:  “consenter”, ”follower”, "config-tracker", "other".
	ConsensusRelation ConsensusRelation `json:"consensusRelation"`
	// Whether the orderer is ”onboarding”, ”active”, or "inactive", for this channel.
	// For non cluster consensus types (solo) it is "active".
	// Possible values:  “onboarding”, ”active”, "inactive".
	Status Status `json:"status"`
	// Current block height.
	Height uint64 `json:"height"`
}

ChannelInfo carries the response to an HTTP request to List a single channel. This is marshaled into the body of the HTTP response. swagger:model channelInfo

type ChannelInfoShort

type ChannelInfoShort struct {
	// The channel name.
	Name string `json:"name"`
	// The channel relative URL (no Host:Port, only path), e.g.: "/participation/v1/channels/my-channel".
	URL string `json:"url"`
}

ChannelInfoShort carries a short info of a single channel.

type ChannelList

type ChannelList struct {
	// The system channel info, nil if it doesn't exist.
	// Deprecated system channel not supported, this will always be nil.
	SystemChannel *ChannelInfoShort `json:"systemChannel"`
	// Application channels only, nil or empty if no channels defined.
	Channels []ChannelInfoShort `json:"channels"`
}

ChannelList carries the response to an HTTP request to List all the channels. This is marshaled into the body of the HTTP response. swagger:model channelList

type ConsensusRelation

type ConsensusRelation string

ConsensusRelation represents the relationship between the orderer and the channel's consensus cluster.

const (
	// The orderer is a cluster consenter of a cluster consensus protocol (e.g. etcdraft) for a specific channel.
	// That is, the orderer is in the consenters set of the channel.
	ConsensusRelationConsenter ConsensusRelation = "consenter"
	// The orderer is following a cluster consensus protocol by pulling blocks from other orderers.
	// The orderer is NOT in the consenters set of the channel.
	ConsensusRelationFollower ConsensusRelation = "follower"
	// The orderer is NOT in the consenters set of the channel, and is just tracking (polling) the last config block
	// of the channel in order to detect when it is added to the channel.
	ConsensusRelationConfigTracker ConsensusRelation = "config-tracker"
	// The orderer runs a non-cluster consensus type, i.e. solo.
	ConsensusRelationOther ConsensusRelation = "other"
)

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse carries the error response an HTTP request. This is marshaled into the body of the HTTP response.

type Status

type Status string

Status represents the degree by which the orderer had caught up with the rest of the cluster after joining the channel (either as a consenter or a follower).

const (
	// The orderer is active in the channel's consensus protocol, or following the cluster,
	// with block height > the join-block number. (Height is last block number +1).
	StatusActive Status = "active"
	// The orderer is catching up with the cluster by pulling blocks from other orderers,
	// with block height <= the join-block number.
	StatusOnBoarding Status = "onboarding"
	// The orderer is not storing any blocks for this channel.
	StatusInactive Status = "inactive"
	// The last orderer operation against the channel failed.
	StatusFailed Status = "failed"
)

Jump to

Keyboard shortcuts

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