orderer

package
v0.0.0-...-99016a9 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package orderer is a generated protocol buffer package.

It is generated from these files:

orderer/ab.proto
orderer/configuration.proto
orderer/kafka.proto

It has these top-level messages:

BroadcastResponse
SeekNewest
SeekOldest
SeekSpecified
SeekPosition
SeekInfo
DeliverResponse
ConsensusType
BatchSize
BatchTimeout
KafkaBrokers
ChannelRestrictions
KafkaMessage
KafkaMessageRegular
KafkaMessageTimeToCut
KafkaMessageConnect
KafkaMetadata

Index

Constants

This section is empty.

Variables

View Source
var SeekInfo_SeekBehavior_name = map[int32]string{
	0: "BLOCK_UNTIL_READY",
	1: "FAIL_IF_NOT_READY",
}
View Source
var SeekInfo_SeekBehavior_value = map[string]int32{
	"BLOCK_UNTIL_READY": 0,
	"FAIL_IF_NOT_READY": 1,
}

Functions

func RegisterAtomicBroadcastServer

func RegisterAtomicBroadcastServer(s *grpc.Server, srv AtomicBroadcastServer)

Types

type AtomicBroadcastClient

type AtomicBroadcastClient interface {
	// broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
	Broadcast(ctx context.Context, opts ...grpc.CallOption) (AtomicBroadcast_BroadcastClient, error)
	// deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received.
	Deliver(ctx context.Context, opts ...grpc.CallOption) (AtomicBroadcast_DeliverClient, error)
}

func NewAtomicBroadcastClient

func NewAtomicBroadcastClient(cc *grpc.ClientConn) AtomicBroadcastClient

type AtomicBroadcastServer

type AtomicBroadcastServer interface {
	// broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
	Broadcast(AtomicBroadcast_BroadcastServer) error
	// deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received.
	Deliver(AtomicBroadcast_DeliverServer) error
}

type AtomicBroadcast_BroadcastClient

type AtomicBroadcast_BroadcastClient interface {
	Send(*common.Envelope) error
	Recv() (*BroadcastResponse, error)
	grpc.ClientStream
}

type AtomicBroadcast_BroadcastServer

type AtomicBroadcast_BroadcastServer interface {
	Send(*BroadcastResponse) error
	Recv() (*common.Envelope, error)
	grpc.ServerStream
}

type AtomicBroadcast_DeliverClient

type AtomicBroadcast_DeliverClient interface {
	Send(*common.Envelope) error
	Recv() (*DeliverResponse, error)
	grpc.ClientStream
}

type AtomicBroadcast_DeliverServer

type AtomicBroadcast_DeliverServer interface {
	Send(*DeliverResponse) error
	Recv() (*common.Envelope, error)
	grpc.ServerStream
}

type BatchSize

type BatchSize struct {
	// Simply specified as number of messages for now, in the future
	// we may want to allow this to be specified by size in bytes
	MaxMessageCount uint32 `protobuf:"varint,1,opt,name=max_message_count,json=maxMessageCount" json:"max_message_count,omitempty"`
	// The byte count of the serialized messages in a batch cannot
	// exceed this value.
	AbsoluteMaxBytes uint32 `protobuf:"varint,2,opt,name=absolute_max_bytes,json=absoluteMaxBytes" json:"absolute_max_bytes,omitempty"`
	// The byte count of the serialized messages in a batch should not
	// exceed this value.
	PreferredMaxBytes uint32 `protobuf:"varint,3,opt,name=preferred_max_bytes,json=preferredMaxBytes" json:"preferred_max_bytes,omitempty"`
}

func (*BatchSize) Descriptor

func (*BatchSize) Descriptor() ([]byte, []int)

func (*BatchSize) GetAbsoluteMaxBytes

func (m *BatchSize) GetAbsoluteMaxBytes() uint32

func (*BatchSize) GetMaxMessageCount

func (m *BatchSize) GetMaxMessageCount() uint32

func (*BatchSize) GetPreferredMaxBytes

func (m *BatchSize) GetPreferredMaxBytes() uint32

func (*BatchSize) ProtoMessage

func (*BatchSize) ProtoMessage()

func (*BatchSize) Reset

func (m *BatchSize) Reset()

func (*BatchSize) String

func (m *BatchSize) String() string

type BatchTimeout

type BatchTimeout struct {
	// Any duration string parseable by ParseDuration():
	// https://golang.org/pkg/time/#ParseDuration
	Timeout string `protobuf:"bytes,1,opt,name=timeout" json:"timeout,omitempty"`
}

func (*BatchTimeout) Descriptor

func (*BatchTimeout) Descriptor() ([]byte, []int)

func (*BatchTimeout) GetTimeout

func (m *BatchTimeout) GetTimeout() string

func (*BatchTimeout) ProtoMessage

func (*BatchTimeout) ProtoMessage()

func (*BatchTimeout) Reset

func (m *BatchTimeout) Reset()

func (*BatchTimeout) String

func (m *BatchTimeout) String() string

type BroadcastResponse

type BroadcastResponse struct {
	Status common.Status `protobuf:"varint,1,opt,name=status,enum=common.Status" json:"status,omitempty"`
}

func (*BroadcastResponse) Descriptor

func (*BroadcastResponse) Descriptor() ([]byte, []int)

func (*BroadcastResponse) GetStatus

func (m *BroadcastResponse) GetStatus() common.Status

func (*BroadcastResponse) ProtoMessage

func (*BroadcastResponse) ProtoMessage()

func (*BroadcastResponse) Reset

func (m *BroadcastResponse) Reset()

func (*BroadcastResponse) String

func (m *BroadcastResponse) String() string

type ChannelRestrictions

type ChannelRestrictions struct {
	MaxCount uint64 `protobuf:"varint,1,opt,name=max_count,json=maxCount" json:"max_count,omitempty"`
}

ChannelRestrictions is the mssage which conveys restrictions on channel creation for an orderer

func (*ChannelRestrictions) Descriptor

func (*ChannelRestrictions) Descriptor() ([]byte, []int)

func (*ChannelRestrictions) GetMaxCount

func (m *ChannelRestrictions) GetMaxCount() uint64

func (*ChannelRestrictions) ProtoMessage

func (*ChannelRestrictions) ProtoMessage()

func (*ChannelRestrictions) Reset

func (m *ChannelRestrictions) Reset()

func (*ChannelRestrictions) String

func (m *ChannelRestrictions) String() string

type ConsensusType

type ConsensusType struct {
	Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
}

func (*ConsensusType) Descriptor

func (*ConsensusType) Descriptor() ([]byte, []int)

func (*ConsensusType) GetType

func (m *ConsensusType) GetType() string

func (*ConsensusType) ProtoMessage

func (*ConsensusType) ProtoMessage()

func (*ConsensusType) Reset

func (m *ConsensusType) Reset()

func (*ConsensusType) String

func (m *ConsensusType) String() string

type DeliverResponse

type DeliverResponse struct {
	// Types that are valid to be assigned to Type:
	//	*DeliverResponse_Status
	//	*DeliverResponse_Block
	Type isDeliverResponse_Type `protobuf_oneof:"Type"`
}

func (*DeliverResponse) Descriptor

func (*DeliverResponse) Descriptor() ([]byte, []int)

func (*DeliverResponse) GetBlock

func (m *DeliverResponse) GetBlock() *common.Block

func (*DeliverResponse) GetStatus

func (m *DeliverResponse) GetStatus() common.Status

func (*DeliverResponse) GetType

func (m *DeliverResponse) GetType() isDeliverResponse_Type

func (*DeliverResponse) ProtoMessage

func (*DeliverResponse) ProtoMessage()

func (*DeliverResponse) Reset

func (m *DeliverResponse) Reset()

func (*DeliverResponse) String

func (m *DeliverResponse) String() string

func (*DeliverResponse) XXX_OneofFuncs

func (*DeliverResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type DeliverResponse_Block

type DeliverResponse_Block struct {
	Block *common.Block `protobuf:"bytes,2,opt,name=block,oneof"`
}

type DeliverResponse_Status

type DeliverResponse_Status struct {
	Status common.Status `protobuf:"varint,1,opt,name=status,enum=common.Status,oneof"`
}

type DynamicOrdererConfigValue

type DynamicOrdererConfigValue struct {
	*common.ConfigValue
	// contains filtered or unexported fields
}

func (*DynamicOrdererConfigValue) VariablyOpaqueFieldProto

func (docv *DynamicOrdererConfigValue) VariablyOpaqueFieldProto(name string) (proto.Message, error)

type DynamicOrdererGroup

type DynamicOrdererGroup struct {
	*common.ConfigGroup
}

func (*DynamicOrdererGroup) DynamicMapFieldProto

func (dcg *DynamicOrdererGroup) DynamicMapFieldProto(name string, key string, base proto.Message) (proto.Message, error)

type DynamicOrdererGroupFactory

type DynamicOrdererGroupFactory struct{}

func (DynamicOrdererGroupFactory) DynamicConfigGroup

func (dogf DynamicOrdererGroupFactory) DynamicConfigGroup(cg *common.ConfigGroup) proto.Message

type DynamicOrdererOrgConfigValue

type DynamicOrdererOrgConfigValue struct {
	*common.ConfigValue
	// contains filtered or unexported fields
}

func (*DynamicOrdererOrgConfigValue) VariablyOpaqueFieldProto

func (doocv *DynamicOrdererOrgConfigValue) VariablyOpaqueFieldProto(name string) (proto.Message, error)

type DynamicOrdererOrgGroup

type DynamicOrdererOrgGroup struct {
	*common.ConfigGroup
}

func (*DynamicOrdererOrgGroup) DynamicMapFieldProto

func (dcg *DynamicOrdererOrgGroup) DynamicMapFieldProto(name string, key string, base proto.Message) (proto.Message, error)

type KafkaBrokers

type KafkaBrokers struct {
	// Each broker here should be identified using the (IP|host):port notation,
	// e.g. 127.0.0.1:7050, or localhost:7050 are valid entries
	Brokers []string `protobuf:"bytes,1,rep,name=brokers" json:"brokers,omitempty"`
}

Carries a list of bootstrap brokers, i.e. this is not the exclusive set of brokers an ordering service

func (*KafkaBrokers) Descriptor

func (*KafkaBrokers) Descriptor() ([]byte, []int)

func (*KafkaBrokers) GetBrokers

func (m *KafkaBrokers) GetBrokers() []string

func (*KafkaBrokers) ProtoMessage

func (*KafkaBrokers) ProtoMessage()

func (*KafkaBrokers) Reset

func (m *KafkaBrokers) Reset()

func (*KafkaBrokers) String

func (m *KafkaBrokers) String() string

type KafkaMessage

type KafkaMessage struct {
	// Types that are valid to be assigned to Type:
	//	*KafkaMessage_Regular
	//	*KafkaMessage_TimeToCut
	//	*KafkaMessage_Connect
	Type isKafkaMessage_Type `protobuf_oneof:"Type"`
}

KafkaMessage is a wrapper type for the messages that the Kafka-based orderer deals with.

func (*KafkaMessage) Descriptor

func (*KafkaMessage) Descriptor() ([]byte, []int)

func (*KafkaMessage) GetConnect

func (m *KafkaMessage) GetConnect() *KafkaMessageConnect

func (*KafkaMessage) GetRegular

func (m *KafkaMessage) GetRegular() *KafkaMessageRegular

func (*KafkaMessage) GetTimeToCut

func (m *KafkaMessage) GetTimeToCut() *KafkaMessageTimeToCut

func (*KafkaMessage) GetType

func (m *KafkaMessage) GetType() isKafkaMessage_Type

func (*KafkaMessage) ProtoMessage

func (*KafkaMessage) ProtoMessage()

func (*KafkaMessage) Reset

func (m *KafkaMessage) Reset()

func (*KafkaMessage) String

func (m *KafkaMessage) String() string

func (*KafkaMessage) XXX_OneofFuncs

func (*KafkaMessage) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type KafkaMessageConnect

type KafkaMessageConnect struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}

KafkaMessageConnect is posted by an orderer upon booting up. It is used to prevent the panic that would be caused if we were to consume an empty partition. It is ignored by all orderers when processing the partition.

func (*KafkaMessageConnect) Descriptor

func (*KafkaMessageConnect) Descriptor() ([]byte, []int)

func (*KafkaMessageConnect) GetPayload

func (m *KafkaMessageConnect) GetPayload() []byte

func (*KafkaMessageConnect) ProtoMessage

func (*KafkaMessageConnect) ProtoMessage()

func (*KafkaMessageConnect) Reset

func (m *KafkaMessageConnect) Reset()

func (*KafkaMessageConnect) String

func (m *KafkaMessageConnect) String() string

type KafkaMessageRegular

type KafkaMessageRegular struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}

KafkaMessageRegular wraps a marshalled envelope.

func (*KafkaMessageRegular) Descriptor

func (*KafkaMessageRegular) Descriptor() ([]byte, []int)

func (*KafkaMessageRegular) GetPayload

func (m *KafkaMessageRegular) GetPayload() []byte

func (*KafkaMessageRegular) ProtoMessage

func (*KafkaMessageRegular) ProtoMessage()

func (*KafkaMessageRegular) Reset

func (m *KafkaMessageRegular) Reset()

func (*KafkaMessageRegular) String

func (m *KafkaMessageRegular) String() string

type KafkaMessageTimeToCut

type KafkaMessageTimeToCut struct {
	BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber" json:"block_number,omitempty"`
}

KafkaMessageTimeToCut is used to signal to the orderers that it is time to cut block <block_number>.

func (*KafkaMessageTimeToCut) Descriptor

func (*KafkaMessageTimeToCut) Descriptor() ([]byte, []int)

func (*KafkaMessageTimeToCut) GetBlockNumber

func (m *KafkaMessageTimeToCut) GetBlockNumber() uint64

func (*KafkaMessageTimeToCut) ProtoMessage

func (*KafkaMessageTimeToCut) ProtoMessage()

func (*KafkaMessageTimeToCut) Reset

func (m *KafkaMessageTimeToCut) Reset()

func (*KafkaMessageTimeToCut) String

func (m *KafkaMessageTimeToCut) String() string

type KafkaMessage_Connect

type KafkaMessage_Connect struct {
	Connect *KafkaMessageConnect `protobuf:"bytes,3,opt,name=connect,oneof"`
}

type KafkaMessage_Regular

type KafkaMessage_Regular struct {
	Regular *KafkaMessageRegular `protobuf:"bytes,1,opt,name=regular,oneof"`
}

type KafkaMessage_TimeToCut

type KafkaMessage_TimeToCut struct {
	TimeToCut *KafkaMessageTimeToCut `protobuf:"bytes,2,opt,name=time_to_cut,json=timeToCut,oneof"`
}

type KafkaMetadata

type KafkaMetadata struct {
	LastOffsetPersisted int64 `protobuf:"varint,1,opt,name=last_offset_persisted,json=lastOffsetPersisted" json:"last_offset_persisted,omitempty"`
}

LastOffsetPersisted is the encoded value for the Metadata message which is encoded in the ORDERER block metadata index for the case of the Kafka-based orderer.

func (*KafkaMetadata) Descriptor

func (*KafkaMetadata) Descriptor() ([]byte, []int)

func (*KafkaMetadata) GetLastOffsetPersisted

func (m *KafkaMetadata) GetLastOffsetPersisted() int64

func (*KafkaMetadata) ProtoMessage

func (*KafkaMetadata) ProtoMessage()

func (*KafkaMetadata) Reset

func (m *KafkaMetadata) Reset()

func (*KafkaMetadata) String

func (m *KafkaMetadata) String() string

type SeekInfo

type SeekInfo struct {
	Start    *SeekPosition         `protobuf:"bytes,1,opt,name=start" json:"start,omitempty"`
	Stop     *SeekPosition         `protobuf:"bytes,2,opt,name=stop" json:"stop,omitempty"`
	Behavior SeekInfo_SeekBehavior `protobuf:"varint,3,opt,name=behavior,enum=orderer.SeekInfo_SeekBehavior" json:"behavior,omitempty"`
}

SeekInfo specifies the range of requested blocks to return If the start position is not found, an error is immediately returned Otherwise, blocks are returned until a missing block is encountered, then behavior is dictated by the SeekBehavior specified. If BLOCK_UNTIL_READY is specified, the reply will block until the requested blocks are available, if FAIL_IF_NOT_READY is specified, the reply will return an error indicating that the block is not found. To request that all blocks be returned indefinitely as they are created, behavior should be set to BLOCK_UNTIL_READY and the stop should be set to specified with a number of MAX_UINT64

func (*SeekInfo) Descriptor

func (*SeekInfo) Descriptor() ([]byte, []int)

func (*SeekInfo) GetBehavior

func (m *SeekInfo) GetBehavior() SeekInfo_SeekBehavior

func (*SeekInfo) GetStart

func (m *SeekInfo) GetStart() *SeekPosition

func (*SeekInfo) GetStop

func (m *SeekInfo) GetStop() *SeekPosition

func (*SeekInfo) ProtoMessage

func (*SeekInfo) ProtoMessage()

func (*SeekInfo) Reset

func (m *SeekInfo) Reset()

func (*SeekInfo) String

func (m *SeekInfo) String() string

type SeekInfo_SeekBehavior

type SeekInfo_SeekBehavior int32
const (
	SeekInfo_BLOCK_UNTIL_READY SeekInfo_SeekBehavior = 0
	SeekInfo_FAIL_IF_NOT_READY SeekInfo_SeekBehavior = 1
)

func (SeekInfo_SeekBehavior) EnumDescriptor

func (SeekInfo_SeekBehavior) EnumDescriptor() ([]byte, []int)

func (SeekInfo_SeekBehavior) String

func (x SeekInfo_SeekBehavior) String() string

type SeekNewest

type SeekNewest struct {
}

func (*SeekNewest) Descriptor

func (*SeekNewest) Descriptor() ([]byte, []int)

func (*SeekNewest) ProtoMessage

func (*SeekNewest) ProtoMessage()

func (*SeekNewest) Reset

func (m *SeekNewest) Reset()

func (*SeekNewest) String

func (m *SeekNewest) String() string

type SeekOldest

type SeekOldest struct {
}

func (*SeekOldest) Descriptor

func (*SeekOldest) Descriptor() ([]byte, []int)

func (*SeekOldest) ProtoMessage

func (*SeekOldest) ProtoMessage()

func (*SeekOldest) Reset

func (m *SeekOldest) Reset()

func (*SeekOldest) String

func (m *SeekOldest) String() string

type SeekPosition

type SeekPosition struct {
	// Types that are valid to be assigned to Type:
	//	*SeekPosition_Newest
	//	*SeekPosition_Oldest
	//	*SeekPosition_Specified
	Type isSeekPosition_Type `protobuf_oneof:"Type"`
}

func (*SeekPosition) Descriptor

func (*SeekPosition) Descriptor() ([]byte, []int)

func (*SeekPosition) GetNewest

func (m *SeekPosition) GetNewest() *SeekNewest

func (*SeekPosition) GetOldest

func (m *SeekPosition) GetOldest() *SeekOldest

func (*SeekPosition) GetSpecified

func (m *SeekPosition) GetSpecified() *SeekSpecified

func (*SeekPosition) GetType

func (m *SeekPosition) GetType() isSeekPosition_Type

func (*SeekPosition) ProtoMessage

func (*SeekPosition) ProtoMessage()

func (*SeekPosition) Reset

func (m *SeekPosition) Reset()

func (*SeekPosition) String

func (m *SeekPosition) String() string

func (*SeekPosition) XXX_OneofFuncs

func (*SeekPosition) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type SeekPosition_Newest

type SeekPosition_Newest struct {
	Newest *SeekNewest `protobuf:"bytes,1,opt,name=newest,oneof"`
}

type SeekPosition_Oldest

type SeekPosition_Oldest struct {
	Oldest *SeekOldest `protobuf:"bytes,2,opt,name=oldest,oneof"`
}

type SeekPosition_Specified

type SeekPosition_Specified struct {
	Specified *SeekSpecified `protobuf:"bytes,3,opt,name=specified,oneof"`
}

type SeekSpecified

type SeekSpecified struct {
	Number uint64 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"`
}

func (*SeekSpecified) Descriptor

func (*SeekSpecified) Descriptor() ([]byte, []int)

func (*SeekSpecified) GetNumber

func (m *SeekSpecified) GetNumber() uint64

func (*SeekSpecified) ProtoMessage

func (*SeekSpecified) ProtoMessage()

func (*SeekSpecified) Reset

func (m *SeekSpecified) Reset()

func (*SeekSpecified) String

func (m *SeekSpecified) String() string

Jump to

Keyboard shortcuts

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