Documentation ¶
Overview ¶
Package abci contains shared data between the host and plugins.
Index ¶
- Variables
- func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer)
- type ABCIListenerServiceClient
- type ABCIListenerServiceServer
- type GRPCClient
- type GRPCServer
- type ListenCommitRequest
- func (*ListenCommitRequest) Descriptor() ([]byte, []int)
- func (m *ListenCommitRequest) GetBlockHeight() int64
- func (m *ListenCommitRequest) GetChangeSet() []*types1.StoreKVPair
- func (m *ListenCommitRequest) GetRes() *types.ResponseCommit
- func (m *ListenCommitRequest) Marshal() (dAtA []byte, err error)
- func (m *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenCommitRequest) ProtoMessage()
- func (m *ListenCommitRequest) Reset()
- func (m *ListenCommitRequest) Size() (n int)
- func (m *ListenCommitRequest) String() string
- func (m *ListenCommitRequest) Unmarshal(dAtA []byte) error
- func (m *ListenCommitRequest) XXX_DiscardUnknown()
- func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenCommitRequest) XXX_Merge(src proto.Message)
- func (m *ListenCommitRequest) XXX_Size() int
- func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error
- type ListenCommitResponse
- func (*ListenCommitResponse) Descriptor() ([]byte, []int)
- func (m *ListenCommitResponse) Marshal() (dAtA []byte, err error)
- func (m *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenCommitResponse) ProtoMessage()
- func (m *ListenCommitResponse) Reset()
- func (m *ListenCommitResponse) Size() (n int)
- func (m *ListenCommitResponse) String() string
- func (m *ListenCommitResponse) Unmarshal(dAtA []byte) error
- func (m *ListenCommitResponse) XXX_DiscardUnknown()
- func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenCommitResponse) XXX_Merge(src proto.Message)
- func (m *ListenCommitResponse) XXX_Size() int
- func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error
- type ListenFinalizeBlockRequest
- func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int)
- func (m *ListenFinalizeBlockRequest) GetReq() *types.RequestFinalizeBlock
- func (m *ListenFinalizeBlockRequest) GetRes() *types.ResponseFinalizeBlock
- func (m *ListenFinalizeBlockRequest) Marshal() (dAtA []byte, err error)
- func (m *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenFinalizeBlockRequest) ProtoMessage()
- func (m *ListenFinalizeBlockRequest) Reset()
- func (m *ListenFinalizeBlockRequest) Size() (n int)
- func (m *ListenFinalizeBlockRequest) String() string
- func (m *ListenFinalizeBlockRequest) Unmarshal(dAtA []byte) error
- func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown()
- func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message)
- func (m *ListenFinalizeBlockRequest) XXX_Size() int
- func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error
- type ListenFinalizeBlockResponse
- func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int)
- func (m *ListenFinalizeBlockResponse) Marshal() (dAtA []byte, err error)
- func (m *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenFinalizeBlockResponse) ProtoMessage()
- func (m *ListenFinalizeBlockResponse) Reset()
- func (m *ListenFinalizeBlockResponse) Size() (n int)
- func (m *ListenFinalizeBlockResponse) String() string
- func (m *ListenFinalizeBlockResponse) Unmarshal(dAtA []byte) error
- func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown()
- func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message)
- func (m *ListenFinalizeBlockResponse) XXX_Size() int
- func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error
- type ListenerGRPCPlugin
- type UnimplementedABCIListenerServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") )
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "ABCI_LISTENER_PLUGIN",
MagicCookieValue: "ef78114d-7bdf-411c-868f-347c99a78345",
}
Handshake is a common handshake that is shared by streaming and host. This prevents users from executing bad plugins or executing a plugin directory. It is a UX feature, not a security feature.
Functions ¶
func RegisterABCIListenerServiceServer ¶
func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer)
Types ¶
type ABCIListenerServiceClient ¶
type ABCIListenerServiceClient interface { // ListenFinalizeBlock is the corresponding endpoint for ABCIListener.ListenEndBlock ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) }
ABCIListenerServiceClient is the client API for ABCIListenerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewABCIListenerServiceClient ¶
func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient
type ABCIListenerServiceServer ¶
type ABCIListenerServiceServer interface { // ListenFinalizeBlock is the corresponding endpoint for ABCIListener.ListenEndBlock ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) }
ABCIListenerServiceServer is the server API for ABCIListenerService service.
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of the ABCIListener interface that talks over RPC.
func (*GRPCClient) ListenCommit ¶
func (m *GRPCClient) ListenCommit(goCtx context.Context, res abci.ResponseCommit, changeSet []*storetypes.StoreKVPair) error
ListenCommit listens to commit responses and state changes for the current block. In addition, it retrieves a types.Context from a context.Context instance. It panics if a types.Context was not properly attached. When the node is configured to stop on listening errors, it will terminate immediately and exit with a non-zero code.
func (*GRPCClient) ListenFinalizeBlock ¶
func (m *GRPCClient) ListenFinalizeBlock(goCtx context.Context, req abci.RequestFinalizeBlock, res abci.ResponseFinalizeBlock) error
ListenEndBlock listens to end block request and responses. In addition, it retrieves a types.Context from a context.Context instance. It panics if a types.Context was not properly attached. When the node is configured to stop on listening errors, it will terminate immediately and exit with a non-zero code.
type GRPCServer ¶
type GRPCServer struct { // This is the real implementation Impl storetypes.ABCIListener }
GRPCServer is the gRPC server that GRPCClient talks to.
func (GRPCServer) ListenCommit ¶
func (m GRPCServer) ListenCommit(ctx context.Context, request *ListenCommitRequest) (*ListenCommitResponse, error)
func (GRPCServer) ListenFinalizeBlock ¶
func (m GRPCServer) ListenFinalizeBlock(ctx context.Context, request *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error)
type ListenCommitRequest ¶
type ListenCommitRequest struct { // explicitly pass in block height as ResponseCommit does not contain this info BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` Res *types.ResponseCommit `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` ChangeSet []*types1.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` }
ListenCommitRequest is the request type for the ListenCommit RPC method
func (*ListenCommitRequest) Descriptor ¶
func (*ListenCommitRequest) Descriptor() ([]byte, []int)
func (*ListenCommitRequest) GetBlockHeight ¶
func (m *ListenCommitRequest) GetBlockHeight() int64
func (*ListenCommitRequest) GetChangeSet ¶
func (m *ListenCommitRequest) GetChangeSet() []*types1.StoreKVPair
func (*ListenCommitRequest) GetRes ¶
func (m *ListenCommitRequest) GetRes() *types.ResponseCommit
func (*ListenCommitRequest) Marshal ¶
func (m *ListenCommitRequest) Marshal() (dAtA []byte, err error)
func (*ListenCommitRequest) MarshalTo ¶
func (m *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error)
func (*ListenCommitRequest) MarshalToSizedBuffer ¶
func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenCommitRequest) ProtoMessage ¶
func (*ListenCommitRequest) ProtoMessage()
func (*ListenCommitRequest) Reset ¶
func (m *ListenCommitRequest) Reset()
func (*ListenCommitRequest) Size ¶
func (m *ListenCommitRequest) Size() (n int)
func (*ListenCommitRequest) String ¶
func (m *ListenCommitRequest) String() string
func (*ListenCommitRequest) Unmarshal ¶
func (m *ListenCommitRequest) Unmarshal(dAtA []byte) error
func (*ListenCommitRequest) XXX_DiscardUnknown ¶
func (m *ListenCommitRequest) XXX_DiscardUnknown()
func (*ListenCommitRequest) XXX_Marshal ¶
func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenCommitRequest) XXX_Merge ¶
func (m *ListenCommitRequest) XXX_Merge(src proto.Message)
func (*ListenCommitRequest) XXX_Size ¶
func (m *ListenCommitRequest) XXX_Size() int
func (*ListenCommitRequest) XXX_Unmarshal ¶
func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error
type ListenCommitResponse ¶
type ListenCommitResponse struct { }
ListenCommitResponse is the response type for the ListenCommit RPC method
func (*ListenCommitResponse) Descriptor ¶
func (*ListenCommitResponse) Descriptor() ([]byte, []int)
func (*ListenCommitResponse) Marshal ¶
func (m *ListenCommitResponse) Marshal() (dAtA []byte, err error)
func (*ListenCommitResponse) MarshalTo ¶
func (m *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error)
func (*ListenCommitResponse) MarshalToSizedBuffer ¶
func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenCommitResponse) ProtoMessage ¶
func (*ListenCommitResponse) ProtoMessage()
func (*ListenCommitResponse) Reset ¶
func (m *ListenCommitResponse) Reset()
func (*ListenCommitResponse) Size ¶
func (m *ListenCommitResponse) Size() (n int)
func (*ListenCommitResponse) String ¶
func (m *ListenCommitResponse) String() string
func (*ListenCommitResponse) Unmarshal ¶
func (m *ListenCommitResponse) Unmarshal(dAtA []byte) error
func (*ListenCommitResponse) XXX_DiscardUnknown ¶
func (m *ListenCommitResponse) XXX_DiscardUnknown()
func (*ListenCommitResponse) XXX_Marshal ¶
func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenCommitResponse) XXX_Merge ¶
func (m *ListenCommitResponse) XXX_Merge(src proto.Message)
func (*ListenCommitResponse) XXX_Size ¶
func (m *ListenCommitResponse) XXX_Size() int
func (*ListenCommitResponse) XXX_Unmarshal ¶
func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error
type ListenFinalizeBlockRequest ¶
type ListenFinalizeBlockRequest struct { Req *types.RequestFinalizeBlock `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` Res *types.ResponseFinalizeBlock `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` }
ListenEndBlockRequest is the request type for the ListenEndBlock RPC method
func (*ListenFinalizeBlockRequest) Descriptor ¶
func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int)
func (*ListenFinalizeBlockRequest) GetReq ¶
func (m *ListenFinalizeBlockRequest) GetReq() *types.RequestFinalizeBlock
func (*ListenFinalizeBlockRequest) GetRes ¶
func (m *ListenFinalizeBlockRequest) GetRes() *types.ResponseFinalizeBlock
func (*ListenFinalizeBlockRequest) Marshal ¶
func (m *ListenFinalizeBlockRequest) Marshal() (dAtA []byte, err error)
func (*ListenFinalizeBlockRequest) MarshalTo ¶
func (m *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error)
func (*ListenFinalizeBlockRequest) MarshalToSizedBuffer ¶
func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenFinalizeBlockRequest) ProtoMessage ¶
func (*ListenFinalizeBlockRequest) ProtoMessage()
func (*ListenFinalizeBlockRequest) Reset ¶
func (m *ListenFinalizeBlockRequest) Reset()
func (*ListenFinalizeBlockRequest) Size ¶
func (m *ListenFinalizeBlockRequest) Size() (n int)
func (*ListenFinalizeBlockRequest) String ¶
func (m *ListenFinalizeBlockRequest) String() string
func (*ListenFinalizeBlockRequest) Unmarshal ¶
func (m *ListenFinalizeBlockRequest) Unmarshal(dAtA []byte) error
func (*ListenFinalizeBlockRequest) XXX_DiscardUnknown ¶
func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown()
func (*ListenFinalizeBlockRequest) XXX_Marshal ¶
func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenFinalizeBlockRequest) XXX_Merge ¶
func (m *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message)
func (*ListenFinalizeBlockRequest) XXX_Size ¶
func (m *ListenFinalizeBlockRequest) XXX_Size() int
func (*ListenFinalizeBlockRequest) XXX_Unmarshal ¶
func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error
type ListenFinalizeBlockResponse ¶
type ListenFinalizeBlockResponse struct { }
ListenEndBlockResponse is the response type for the ListenEndBlock RPC method
func (*ListenFinalizeBlockResponse) Descriptor ¶
func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int)
func (*ListenFinalizeBlockResponse) Marshal ¶
func (m *ListenFinalizeBlockResponse) Marshal() (dAtA []byte, err error)
func (*ListenFinalizeBlockResponse) MarshalTo ¶
func (m *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error)
func (*ListenFinalizeBlockResponse) MarshalToSizedBuffer ¶
func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenFinalizeBlockResponse) ProtoMessage ¶
func (*ListenFinalizeBlockResponse) ProtoMessage()
func (*ListenFinalizeBlockResponse) Reset ¶
func (m *ListenFinalizeBlockResponse) Reset()
func (*ListenFinalizeBlockResponse) Size ¶
func (m *ListenFinalizeBlockResponse) Size() (n int)
func (*ListenFinalizeBlockResponse) String ¶
func (m *ListenFinalizeBlockResponse) String() string
func (*ListenFinalizeBlockResponse) Unmarshal ¶
func (m *ListenFinalizeBlockResponse) Unmarshal(dAtA []byte) error
func (*ListenFinalizeBlockResponse) XXX_DiscardUnknown ¶
func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown()
func (*ListenFinalizeBlockResponse) XXX_Marshal ¶
func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenFinalizeBlockResponse) XXX_Merge ¶
func (m *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message)
func (*ListenFinalizeBlockResponse) XXX_Size ¶
func (m *ListenFinalizeBlockResponse) XXX_Size() int
func (*ListenFinalizeBlockResponse) XXX_Unmarshal ¶
func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error
type ListenerGRPCPlugin ¶
type ListenerGRPCPlugin struct { // GRPCPlugin must still implement the Plugin interface plugin.Plugin // Concrete implementation, written in Go. This is only used for plugins // that are written in Go. Impl storetypes.ABCIListener }
ListenerGRPCPlugin is the implementation of plugin.GRPCPlugin, so we can serve/consume this.
func (*ListenerGRPCPlugin) GRPCClient ¶
func (p *ListenerGRPCPlugin) GRPCClient( _ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn, ) (interface{}, error)
func (*ListenerGRPCPlugin) GRPCServer ¶
func (p *ListenerGRPCPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error
type UnimplementedABCIListenerServiceServer ¶
type UnimplementedABCIListenerServiceServer struct { }
UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedABCIListenerServiceServer) ListenCommit ¶
func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error)
func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock ¶
func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error)