proto

package
v0.0.0-...-1cfbcab Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBlockchainServer

func RegisterBlockchainServer(s *grpc.Server, srv BlockchainServer)

func RegisterPBFTServer

func RegisterPBFTServer(s *grpc.Server, srv PBFTServer)

func RegisterSyncServer

func RegisterSyncServer(s *grpc.Server, srv SyncServer)

Types

type Ack

type Ack struct {
	Received             bool     `protobuf:"varint,1,opt,name=received,proto3" json:"received,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Ack) Descriptor

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

func (*Ack) GetReceived

func (m *Ack) GetReceived() bool

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) Reset

func (m *Ack) Reset()

func (*Ack) String

func (m *Ack) String() string

func (*Ack) XXX_DiscardUnknown

func (m *Ack) XXX_DiscardUnknown()

func (*Ack) XXX_Marshal

func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ack) XXX_Merge

func (m *Ack) XXX_Merge(src proto.Message)

func (*Ack) XXX_Size

func (m *Ack) XXX_Size() int

func (*Ack) XXX_Unmarshal

func (m *Ack) XXX_Unmarshal(b []byte) error

type AddBlockRequest

type AddBlockRequest struct {
	Data                 *BlockData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*AddBlockRequest) Descriptor

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

func (*AddBlockRequest) GetData

func (m *AddBlockRequest) GetData() *BlockData

func (*AddBlockRequest) ProtoMessage

func (*AddBlockRequest) ProtoMessage()

func (*AddBlockRequest) Reset

func (m *AddBlockRequest) Reset()

func (*AddBlockRequest) String

func (m *AddBlockRequest) String() string

func (*AddBlockRequest) XXX_DiscardUnknown

func (m *AddBlockRequest) XXX_DiscardUnknown()

func (*AddBlockRequest) XXX_Marshal

func (m *AddBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddBlockRequest) XXX_Merge

func (m *AddBlockRequest) XXX_Merge(src proto.Message)

func (*AddBlockRequest) XXX_Size

func (m *AddBlockRequest) XXX_Size() int

func (*AddBlockRequest) XXX_Unmarshal

func (m *AddBlockRequest) XXX_Unmarshal(b []byte) error

type AddBlockResponse

type AddBlockResponse struct {
	ACK                  bool     `protobuf:"varint,1,opt,name=ACK,json=aCK,proto3" json:"ACK,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddBlockResponse) Descriptor

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

func (*AddBlockResponse) GetACK

func (m *AddBlockResponse) GetACK() bool

func (*AddBlockResponse) ProtoMessage

func (*AddBlockResponse) ProtoMessage()

func (*AddBlockResponse) Reset

func (m *AddBlockResponse) Reset()

func (*AddBlockResponse) String

func (m *AddBlockResponse) String() string

func (*AddBlockResponse) XXX_DiscardUnknown

func (m *AddBlockResponse) XXX_DiscardUnknown()

func (*AddBlockResponse) XXX_Marshal

func (m *AddBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddBlockResponse) XXX_Merge

func (m *AddBlockResponse) XXX_Merge(src proto.Message)

func (*AddBlockResponse) XXX_Size

func (m *AddBlockResponse) XXX_Size() int

func (*AddBlockResponse) XXX_Unmarshal

func (m *AddBlockResponse) XXX_Unmarshal(b []byte) error

type Block

type Block struct {
	PrevBlockHash        string     `protobuf:"bytes,1,opt,name=prevBlockHash,proto3" json:"prevBlockHash,omitempty"`
	Data                 *BlockData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Hash                 string     `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Block) Descriptor

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

func (*Block) GetData

func (m *Block) GetData() *BlockData

func (*Block) GetHash

func (m *Block) GetHash() string

func (*Block) GetPrevBlockHash

func (m *Block) GetPrevBlockHash() string

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Reset

func (m *Block) Reset()

func (*Block) String

func (m *Block) String() string

func (*Block) XXX_DiscardUnknown

func (m *Block) XXX_DiscardUnknown()

func (*Block) XXX_Marshal

func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Block) XXX_Merge

func (m *Block) XXX_Merge(src proto.Message)

func (*Block) XXX_Size

func (m *Block) XXX_Size() int

func (*Block) XXX_Unmarshal

func (m *Block) XXX_Unmarshal(b []byte) error

type BlockData

type BlockData struct {
	Timestamp            string            `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	PublicKey            string            `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	Signature            string            `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	ProjectID            string            `protobuf:"bytes,4,opt,name=projectID,proto3" json:"projectID,omitempty"`
	CommitHash           string            `protobuf:"bytes,5,opt,name=commitHash,proto3" json:"commitHash,omitempty"`
	FileHashes           map[string]string `` /* 161-byte string literal not displayed */
	MetaData             map[string]string `` /* 157-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*BlockData) Descriptor

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

func (*BlockData) GetCommitHash

func (m *BlockData) GetCommitHash() string

func (*BlockData) GetFileHashes

func (m *BlockData) GetFileHashes() map[string]string

func (*BlockData) GetMetaData

func (m *BlockData) GetMetaData() map[string]string

func (*BlockData) GetProjectID

func (m *BlockData) GetProjectID() string

func (*BlockData) GetPublicKey

func (m *BlockData) GetPublicKey() string

func (*BlockData) GetSignature

func (m *BlockData) GetSignature() string

func (*BlockData) GetTimestamp

func (m *BlockData) GetTimestamp() string

func (*BlockData) ProtoMessage

func (*BlockData) ProtoMessage()

func (*BlockData) Reset

func (m *BlockData) Reset()

func (*BlockData) String

func (m *BlockData) String() string

func (*BlockData) XXX_DiscardUnknown

func (m *BlockData) XXX_DiscardUnknown()

func (*BlockData) XXX_Marshal

func (m *BlockData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockData) XXX_Merge

func (m *BlockData) XXX_Merge(src proto.Message)

func (*BlockData) XXX_Size

func (m *BlockData) XXX_Size() int

func (*BlockData) XXX_Unmarshal

func (m *BlockData) XXX_Unmarshal(b []byte) error

type BlockchainClient

type BlockchainClient interface {
	AddBlock(ctx context.Context, in *AddBlockRequest, opts ...grpc.CallOption) (*AddBlockResponse, error)
	GetBlockchain(ctx context.Context, in *GetBlockchainRequest, opts ...grpc.CallOption) (*GetBlockchainResponse, error)
}

BlockchainClient is the client API for Blockchain service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewBlockchainClient

func NewBlockchainClient(cc *grpc.ClientConn) BlockchainClient

type BlockchainServer

type BlockchainServer interface {
	AddBlock(context.Context, *AddBlockRequest) (*AddBlockResponse, error)
	GetBlockchain(context.Context, *GetBlockchainRequest) (*GetBlockchainResponse, error)
}

BlockchainServer is the server API for Blockchain service.

type CommitRequest

type CommitRequest struct {
	BlockHash            string   `protobuf:"bytes,1,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	BlockNumber          int64    `protobuf:"varint,2,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"`
	ViewNumber           int64    `protobuf:"varint,3,opt,name=viewNumber,proto3" json:"viewNumber,omitempty"`
	NodeID               string   `protobuf:"bytes,4,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CommitRequest) Descriptor

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

func (*CommitRequest) GetBlockHash

func (m *CommitRequest) GetBlockHash() string

func (*CommitRequest) GetBlockNumber

func (m *CommitRequest) GetBlockNumber() int64

func (*CommitRequest) GetNodeID

func (m *CommitRequest) GetNodeID() string

func (*CommitRequest) GetViewNumber

func (m *CommitRequest) GetViewNumber() int64

func (*CommitRequest) ProtoMessage

func (*CommitRequest) ProtoMessage()

func (*CommitRequest) Reset

func (m *CommitRequest) Reset()

func (*CommitRequest) String

func (m *CommitRequest) String() string

func (*CommitRequest) XXX_DiscardUnknown

func (m *CommitRequest) XXX_DiscardUnknown()

func (*CommitRequest) XXX_Marshal

func (m *CommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommitRequest) XXX_Merge

func (m *CommitRequest) XXX_Merge(src proto.Message)

func (*CommitRequest) XXX_Size

func (m *CommitRequest) XXX_Size() int

func (*CommitRequest) XXX_Unmarshal

func (m *CommitRequest) XXX_Unmarshal(b []byte) error

type ConsensusInfo

type ConsensusInfo struct {
	ConsensusMode        string   `protobuf:"bytes,1,opt,name=consensusMode,proto3" json:"consensusMode,omitempty"`
	Iteration            int64    `protobuf:"varint,2,opt,name=iteration,proto3" json:"iteration,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConsensusInfo) Descriptor

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

func (*ConsensusInfo) GetConsensusMode

func (m *ConsensusInfo) GetConsensusMode() string

func (*ConsensusInfo) GetIteration

func (m *ConsensusInfo) GetIteration() int64

func (*ConsensusInfo) ProtoMessage

func (*ConsensusInfo) ProtoMessage()

func (*ConsensusInfo) Reset

func (m *ConsensusInfo) Reset()

func (*ConsensusInfo) String

func (m *ConsensusInfo) String() string

func (*ConsensusInfo) XXX_DiscardUnknown

func (m *ConsensusInfo) XXX_DiscardUnknown()

func (*ConsensusInfo) XXX_Marshal

func (m *ConsensusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConsensusInfo) XXX_Merge

func (m *ConsensusInfo) XXX_Merge(src proto.Message)

func (*ConsensusInfo) XXX_Size

func (m *ConsensusInfo) XXX_Size() int

func (*ConsensusInfo) XXX_Unmarshal

func (m *ConsensusInfo) XXX_Unmarshal(b []byte) error

type FastForwardRequest

type FastForwardRequest struct {
	Blocks               []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	ConsensusMode        string   `protobuf:"bytes,2,opt,name=consensusMode,proto3" json:"consensusMode,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FastForwardRequest) Descriptor

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

func (*FastForwardRequest) GetBlocks

func (m *FastForwardRequest) GetBlocks() []*Block

func (*FastForwardRequest) GetConsensusMode

func (m *FastForwardRequest) GetConsensusMode() string

func (*FastForwardRequest) ProtoMessage

func (*FastForwardRequest) ProtoMessage()

func (*FastForwardRequest) Reset

func (m *FastForwardRequest) Reset()

func (*FastForwardRequest) String

func (m *FastForwardRequest) String() string

func (*FastForwardRequest) XXX_DiscardUnknown

func (m *FastForwardRequest) XXX_DiscardUnknown()

func (*FastForwardRequest) XXX_Marshal

func (m *FastForwardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FastForwardRequest) XXX_Merge

func (m *FastForwardRequest) XXX_Merge(src proto.Message)

func (*FastForwardRequest) XXX_Size

func (m *FastForwardRequest) XXX_Size() int

func (*FastForwardRequest) XXX_Unmarshal

func (m *FastForwardRequest) XXX_Unmarshal(b []byte) error

type FastForwardResponse

type FastForwardResponse struct {
	Blocks               []*Block       `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	DivergentIndex       int64          `protobuf:"varint,2,opt,name=divergentIndex,proto3" json:"divergentIndex,omitempty"`
	CInfo                *ConsensusInfo `protobuf:"bytes,3,opt,name=cInfo,proto3" json:"cInfo,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*FastForwardResponse) Descriptor

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

func (*FastForwardResponse) GetBlocks

func (m *FastForwardResponse) GetBlocks() []*Block

func (*FastForwardResponse) GetCInfo

func (m *FastForwardResponse) GetCInfo() *ConsensusInfo

func (*FastForwardResponse) GetDivergentIndex

func (m *FastForwardResponse) GetDivergentIndex() int64

func (*FastForwardResponse) ProtoMessage

func (*FastForwardResponse) ProtoMessage()

func (*FastForwardResponse) Reset

func (m *FastForwardResponse) Reset()

func (*FastForwardResponse) String

func (m *FastForwardResponse) String() string

func (*FastForwardResponse) XXX_DiscardUnknown

func (m *FastForwardResponse) XXX_DiscardUnknown()

func (*FastForwardResponse) XXX_Marshal

func (m *FastForwardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FastForwardResponse) XXX_Merge

func (m *FastForwardResponse) XXX_Merge(src proto.Message)

func (*FastForwardResponse) XXX_Size

func (m *FastForwardResponse) XXX_Size() int

func (*FastForwardResponse) XXX_Unmarshal

func (m *FastForwardResponse) XXX_Unmarshal(b []byte) error

type GetBlockchainRequest

type GetBlockchainRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetBlockchainRequest) Descriptor

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

func (*GetBlockchainRequest) ProtoMessage

func (*GetBlockchainRequest) ProtoMessage()

func (*GetBlockchainRequest) Reset

func (m *GetBlockchainRequest) Reset()

func (*GetBlockchainRequest) String

func (m *GetBlockchainRequest) String() string

func (*GetBlockchainRequest) XXX_DiscardUnknown

func (m *GetBlockchainRequest) XXX_DiscardUnknown()

func (*GetBlockchainRequest) XXX_Marshal

func (m *GetBlockchainRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockchainRequest) XXX_Merge

func (m *GetBlockchainRequest) XXX_Merge(src proto.Message)

func (*GetBlockchainRequest) XXX_Size

func (m *GetBlockchainRequest) XXX_Size() int

func (*GetBlockchainRequest) XXX_Unmarshal

func (m *GetBlockchainRequest) XXX_Unmarshal(b []byte) error

type GetBlockchainResponse

type GetBlockchainResponse struct {
	Blocks               []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetBlockchainResponse) Descriptor

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

func (*GetBlockchainResponse) GetBlocks

func (m *GetBlockchainResponse) GetBlocks() []*Block

func (*GetBlockchainResponse) ProtoMessage

func (*GetBlockchainResponse) ProtoMessage()

func (*GetBlockchainResponse) Reset

func (m *GetBlockchainResponse) Reset()

func (*GetBlockchainResponse) String

func (m *GetBlockchainResponse) String() string

func (*GetBlockchainResponse) XXX_DiscardUnknown

func (m *GetBlockchainResponse) XXX_DiscardUnknown()

func (*GetBlockchainResponse) XXX_Marshal

func (m *GetBlockchainResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockchainResponse) XXX_Merge

func (m *GetBlockchainResponse) XXX_Merge(src proto.Message)

func (*GetBlockchainResponse) XXX_Size

func (m *GetBlockchainResponse) XXX_Size() int

func (*GetBlockchainResponse) XXX_Unmarshal

func (m *GetBlockchainResponse) XXX_Unmarshal(b []byte) error

type GetNetworkRequest

type GetNetworkRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetNetworkRequest) Descriptor

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

func (*GetNetworkRequest) ProtoMessage

func (*GetNetworkRequest) ProtoMessage()

func (*GetNetworkRequest) Reset

func (m *GetNetworkRequest) Reset()

func (*GetNetworkRequest) String

func (m *GetNetworkRequest) String() string

func (*GetNetworkRequest) XXX_DiscardUnknown

func (m *GetNetworkRequest) XXX_DiscardUnknown()

func (*GetNetworkRequest) XXX_Marshal

func (m *GetNetworkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetNetworkRequest) XXX_Merge

func (m *GetNetworkRequest) XXX_Merge(src proto.Message)

func (*GetNetworkRequest) XXX_Size

func (m *GetNetworkRequest) XXX_Size() int

func (*GetNetworkRequest) XXX_Unmarshal

func (m *GetNetworkRequest) XXX_Unmarshal(b []byte) error

type GetNetworkResponse

type GetNetworkResponse struct {
	NodeIDs              []string `protobuf:"bytes,1,rep,name=nodeIDs,proto3" json:"nodeIDs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetNetworkResponse) Descriptor

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

func (*GetNetworkResponse) GetNodeIDs

func (m *GetNetworkResponse) GetNodeIDs() []string

func (*GetNetworkResponse) ProtoMessage

func (*GetNetworkResponse) ProtoMessage()

func (*GetNetworkResponse) Reset

func (m *GetNetworkResponse) Reset()

func (*GetNetworkResponse) String

func (m *GetNetworkResponse) String() string

func (*GetNetworkResponse) XXX_DiscardUnknown

func (m *GetNetworkResponse) XXX_DiscardUnknown()

func (*GetNetworkResponse) XXX_Marshal

func (m *GetNetworkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetNetworkResponse) XXX_Merge

func (m *GetNetworkResponse) XXX_Merge(src proto.Message)

func (*GetNetworkResponse) XXX_Size

func (m *GetNetworkResponse) XXX_Size() int

func (*GetNetworkResponse) XXX_Unmarshal

func (m *GetNetworkResponse) XXX_Unmarshal(b []byte) error

type GetStateRequest

type GetStateRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetStateRequest) Descriptor

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

func (*GetStateRequest) ProtoMessage

func (*GetStateRequest) ProtoMessage()

func (*GetStateRequest) Reset

func (m *GetStateRequest) Reset()

func (*GetStateRequest) String

func (m *GetStateRequest) String() string

func (*GetStateRequest) XXX_DiscardUnknown

func (m *GetStateRequest) XXX_DiscardUnknown()

func (*GetStateRequest) XXX_Marshal

func (m *GetStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetStateRequest) XXX_Merge

func (m *GetStateRequest) XXX_Merge(src proto.Message)

func (*GetStateRequest) XXX_Size

func (m *GetStateRequest) XXX_Size() int

func (*GetStateRequest) XXX_Unmarshal

func (m *GetStateRequest) XXX_Unmarshal(b []byte) error

type GetStateResponse

type GetStateResponse struct {
	StateDebugName       string   `protobuf:"bytes,1,opt,name=stateDebugName,proto3" json:"stateDebugName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetStateResponse) Descriptor

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

func (*GetStateResponse) GetStateDebugName

func (m *GetStateResponse) GetStateDebugName() string

func (*GetStateResponse) ProtoMessage

func (*GetStateResponse) ProtoMessage()

func (*GetStateResponse) Reset

func (m *GetStateResponse) Reset()

func (*GetStateResponse) String

func (m *GetStateResponse) String() string

func (*GetStateResponse) XXX_DiscardUnknown

func (m *GetStateResponse) XXX_DiscardUnknown()

func (*GetStateResponse) XXX_Marshal

func (m *GetStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetStateResponse) XXX_Merge

func (m *GetStateResponse) XXX_Merge(src proto.Message)

func (*GetStateResponse) XXX_Size

func (m *GetStateResponse) XXX_Size() int

func (*GetStateResponse) XXX_Unmarshal

func (m *GetStateResponse) XXX_Unmarshal(b []byte) error

type PBFTClient

type PBFTClient interface {
	PrePrepare(ctx context.Context, in *PrePrepareRequest, opts ...grpc.CallOption) (*Ack, error)
	Prepare(ctx context.Context, in *PrepareRequest, opts ...grpc.CallOption) (*Ack, error)
	Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*Ack, error)
}

PBFTClient is the client API for PBFT service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPBFTClient

func NewPBFTClient(cc *grpc.ClientConn) PBFTClient

type PBFTServer

type PBFTServer interface {
	PrePrepare(context.Context, *PrePrepareRequest) (*Ack, error)
	Prepare(context.Context, *PrepareRequest) (*Ack, error)
	Commit(context.Context, *CommitRequest) (*Ack, error)
}

PBFTServer is the server API for PBFT service.

type PrePrepareRequest

type PrePrepareRequest struct {
	Block                *Block   `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	BlockNumber          int64    `protobuf:"varint,2,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"`
	ViewNumber           int64    `protobuf:"varint,3,opt,name=viewNumber,proto3" json:"viewNumber,omitempty"`
	LeaderID             string   `protobuf:"bytes,4,opt,name=leaderID,proto3" json:"leaderID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PrePrepareRequest) Descriptor

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

func (*PrePrepareRequest) GetBlock

func (m *PrePrepareRequest) GetBlock() *Block

func (*PrePrepareRequest) GetBlockNumber

func (m *PrePrepareRequest) GetBlockNumber() int64

func (*PrePrepareRequest) GetLeaderID

func (m *PrePrepareRequest) GetLeaderID() string

func (*PrePrepareRequest) GetViewNumber

func (m *PrePrepareRequest) GetViewNumber() int64

func (*PrePrepareRequest) ProtoMessage

func (*PrePrepareRequest) ProtoMessage()

func (*PrePrepareRequest) Reset

func (m *PrePrepareRequest) Reset()

func (*PrePrepareRequest) String

func (m *PrePrepareRequest) String() string

func (*PrePrepareRequest) XXX_DiscardUnknown

func (m *PrePrepareRequest) XXX_DiscardUnknown()

func (*PrePrepareRequest) XXX_Marshal

func (m *PrePrepareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrePrepareRequest) XXX_Merge

func (m *PrePrepareRequest) XXX_Merge(src proto.Message)

func (*PrePrepareRequest) XXX_Size

func (m *PrePrepareRequest) XXX_Size() int

func (*PrePrepareRequest) XXX_Unmarshal

func (m *PrePrepareRequest) XXX_Unmarshal(b []byte) error

type PrepareRequest

type PrepareRequest struct {
	BlockHash            string   `protobuf:"bytes,1,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	BlockNumber          int64    `protobuf:"varint,2,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"`
	ViewNumber           int64    `protobuf:"varint,3,opt,name=viewNumber,proto3" json:"viewNumber,omitempty"`
	NodeID               string   `protobuf:"bytes,4,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PrepareRequest) Descriptor

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

func (*PrepareRequest) GetBlockHash

func (m *PrepareRequest) GetBlockHash() string

func (*PrepareRequest) GetBlockNumber

func (m *PrepareRequest) GetBlockNumber() int64

func (*PrepareRequest) GetNodeID

func (m *PrepareRequest) GetNodeID() string

func (*PrepareRequest) GetViewNumber

func (m *PrepareRequest) GetViewNumber() int64

func (*PrepareRequest) ProtoMessage

func (*PrepareRequest) ProtoMessage()

func (*PrepareRequest) Reset

func (m *PrepareRequest) Reset()

func (*PrepareRequest) String

func (m *PrepareRequest) String() string

func (*PrepareRequest) XXX_DiscardUnknown

func (m *PrepareRequest) XXX_DiscardUnknown()

func (*PrepareRequest) XXX_Marshal

func (m *PrepareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrepareRequest) XXX_Merge

func (m *PrepareRequest) XXX_Merge(src proto.Message)

func (*PrepareRequest) XXX_Size

func (m *PrepareRequest) XXX_Size() int

func (*PrepareRequest) XXX_Unmarshal

func (m *PrepareRequest) XXX_Unmarshal(b []byte) error

type SyncClient

type SyncClient interface {
	FastForward(ctx context.Context, in *FastForwardRequest, opts ...grpc.CallOption) (*FastForwardResponse, error)
	GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error)
	GetNetwork(ctx context.Context, in *GetNetworkRequest, opts ...grpc.CallOption) (*GetNetworkResponse, error)
}

SyncClient is the client API for Sync service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSyncClient

func NewSyncClient(cc *grpc.ClientConn) SyncClient

type SyncServer

SyncServer is the server API for Sync service.

type UnimplementedBlockchainServer

type UnimplementedBlockchainServer struct {
}

UnimplementedBlockchainServer can be embedded to have forward compatible implementations.

func (*UnimplementedBlockchainServer) AddBlock

func (*UnimplementedBlockchainServer) GetBlockchain

type UnimplementedPBFTServer

type UnimplementedPBFTServer struct {
}

UnimplementedPBFTServer can be embedded to have forward compatible implementations.

func (*UnimplementedPBFTServer) Commit

func (*UnimplementedPBFTServer) PrePrepare

func (*UnimplementedPBFTServer) Prepare

type UnimplementedSyncServer

type UnimplementedSyncServer struct {
}

UnimplementedSyncServer can be embedded to have forward compatible implementations.

func (*UnimplementedSyncServer) FastForward

func (*UnimplementedSyncServer) GetNetwork

func (*UnimplementedSyncServer) GetState

Jump to

Keyboard shortcuts

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