Documentation
¶
Overview ¶
Package streaming provides shared data structures and interfaces for communication between the host application and plugins in a streaming context.
Index ¶
- Variables
- func GetPluginEnvKey(name string) string
- func NewStreamingPlugin(name, logLevel string) (interface{}, error)
- func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer)
- type Context
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetAttributes() []*EventAttribute
- func (m *Event) GetType() string
- func (m *Event) Marshal() (dAtA []byte, err error)
- func (m *Event) MarshalTo(dAtA []byte) (int, error)
- func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) Size() (n int)
- func (m *Event) String() string
- func (m *Event) Unmarshal(dAtA []byte) error
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type EventAttribute
- func (*EventAttribute) Descriptor() ([]byte, []int)
- func (m *EventAttribute) GetKey() string
- func (m *EventAttribute) GetValue() string
- func (m *EventAttribute) Marshal() (dAtA []byte, err error)
- func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error)
- func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventAttribute) ProtoMessage()
- func (m *EventAttribute) Reset()
- func (m *EventAttribute) Size() (n int)
- func (m *EventAttribute) String() string
- func (m *EventAttribute) Unmarshal(dAtA []byte) error
- func (m *EventAttribute) XXX_DiscardUnknown()
- func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventAttribute) XXX_Merge(src proto.Message)
- func (m *EventAttribute) XXX_Size() int
- func (m *EventAttribute) XXX_Unmarshal(b []byte) error
- type ExecTxResult
- func (*ExecTxResult) Descriptor() ([]byte, []int)
- func (m *ExecTxResult) GetCode() uint32
- func (m *ExecTxResult) GetCodespace() string
- func (m *ExecTxResult) GetData() []byte
- func (m *ExecTxResult) GetEvents() []*Event
- func (m *ExecTxResult) GetGasUsed() int64
- func (m *ExecTxResult) GetGasWanted() int64
- func (m *ExecTxResult) GetInfo() string
- func (m *ExecTxResult) GetLog() string
- func (m *ExecTxResult) Marshal() (dAtA []byte, err error)
- func (m *ExecTxResult) MarshalTo(dAtA []byte) (int, error)
- func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ExecTxResult) ProtoMessage()
- func (m *ExecTxResult) Reset()
- func (m *ExecTxResult) Size() (n int)
- func (m *ExecTxResult) String() string
- func (m *ExecTxResult) Unmarshal(dAtA []byte) error
- func (m *ExecTxResult) XXX_DiscardUnknown()
- func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExecTxResult) XXX_Merge(src proto.Message)
- func (m *ExecTxResult) XXX_Size() int
- func (m *ExecTxResult) XXX_Unmarshal(b []byte) error
- type GRPCClient
- type GRPCServer
- type ListenDeliverBlockRequest
- func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int)
- func (m *ListenDeliverBlockRequest) GetBlockHeight() int64
- func (m *ListenDeliverBlockRequest) GetEvents() []*Event
- func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult
- func (m *ListenDeliverBlockRequest) GetTxs() [][]byte
- func (m *ListenDeliverBlockRequest) Marshal() (dAtA []byte, err error)
- func (m *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenDeliverBlockRequest) ProtoMessage()
- func (m *ListenDeliverBlockRequest) Reset()
- func (m *ListenDeliverBlockRequest) Size() (n int)
- func (m *ListenDeliverBlockRequest) String() string
- func (m *ListenDeliverBlockRequest) Unmarshal(dAtA []byte) error
- func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown()
- func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenDeliverBlockRequest) XXX_Merge(src proto.Message)
- func (m *ListenDeliverBlockRequest) XXX_Size() int
- func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error
- type ListenDeliverBlockResponse
- func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int)
- func (m *ListenDeliverBlockResponse) Marshal() (dAtA []byte, err error)
- func (m *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenDeliverBlockResponse) ProtoMessage()
- func (m *ListenDeliverBlockResponse) Reset()
- func (m *ListenDeliverBlockResponse) Size() (n int)
- func (m *ListenDeliverBlockResponse) String() string
- func (m *ListenDeliverBlockResponse) Unmarshal(dAtA []byte) error
- func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown()
- func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenDeliverBlockResponse) XXX_Merge(src proto.Message)
- func (m *ListenDeliverBlockResponse) XXX_Size() int
- func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error
- type ListenStateChangesRequest
- func (*ListenStateChangesRequest) Descriptor() ([]byte, []int)
- func (m *ListenStateChangesRequest) GetAppHash() []byte
- func (m *ListenStateChangesRequest) GetBlockHeight() int64
- func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair
- func (m *ListenStateChangesRequest) Marshal() (dAtA []byte, err error)
- func (m *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenStateChangesRequest) ProtoMessage()
- func (m *ListenStateChangesRequest) Reset()
- func (m *ListenStateChangesRequest) Size() (n int)
- func (m *ListenStateChangesRequest) String() string
- func (m *ListenStateChangesRequest) Unmarshal(dAtA []byte) error
- func (m *ListenStateChangesRequest) XXX_DiscardUnknown()
- func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenStateChangesRequest) XXX_Merge(src proto.Message)
- func (m *ListenStateChangesRequest) XXX_Size() int
- func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error
- type ListenStateChangesResponse
- func (*ListenStateChangesResponse) Descriptor() ([]byte, []int)
- func (m *ListenStateChangesResponse) Marshal() (dAtA []byte, err error)
- func (m *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenStateChangesResponse) ProtoMessage()
- func (m *ListenStateChangesResponse) Reset()
- func (m *ListenStateChangesResponse) Size() (n int)
- func (m *ListenStateChangesResponse) String() string
- func (m *ListenStateChangesResponse) Unmarshal(dAtA []byte) error
- func (m *ListenStateChangesResponse) XXX_DiscardUnknown()
- func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenStateChangesResponse) XXX_Merge(src proto.Message)
- func (m *ListenStateChangesResponse) XXX_Size() int
- func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error
- type Listener
- type ListenerConfig
- type ListenerGRPCPlugin
- type ListenerServiceClient
- type ListenerServiceServer
- type Manager
- type StoreKVPair
- func (*StoreKVPair) Descriptor() ([]byte, []int)
- func (m *StoreKVPair) GetAddress() []byte
- func (m *StoreKVPair) GetDelete() bool
- func (m *StoreKVPair) GetKey() []byte
- func (m *StoreKVPair) GetValue() []byte
- func (m *StoreKVPair) Marshal() (dAtA []byte, err error)
- func (m *StoreKVPair) MarshalTo(dAtA []byte) (int, error)
- func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StoreKVPair) ProtoMessage()
- func (m *StoreKVPair) Reset()
- func (m *StoreKVPair) Size() (n int)
- func (m *StoreKVPair) String() string
- func (m *StoreKVPair) Unmarshal(dAtA []byte) error
- func (m *StoreKVPair) XXX_DiscardUnknown()
- func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StoreKVPair) XXX_Merge(src proto.Message)
- func (m *StoreKVPair) XXX_Size() int
- func (m *StoreKVPair) XXX_Unmarshal(b []byte) error
- type StreamingConfig
- type UnimplementedListenerServiceServer
- func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error)
- func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error)
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 defines the handshake configuration shared by the streaming service and host. It serves as a UX feature to prevent execution of incompatible or unintended plugins.
var HandshakeMap = map[string]plugin.HandshakeConfig{ // contains filtered or unexported fields }
HandshakeMap contains a map of each supported streaming's handshake config
var ListenerService_serviceDesc = _ListenerService_serviceDesc
var PluginMap = map[string]plugin.Plugin{ // contains filtered or unexported fields }
PluginMap contains a map of supported gRPC plugins
Functions ¶
func GetPluginEnvKey ¶
func NewStreamingPlugin ¶
func RegisterListenerServiceServer ¶
func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer)
Types ¶
type Context ¶
Context is an interface used by an App to pass context information needed to process store streaming requests.
type Event ¶
type Event struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
}
Event is a single event, associated with a transaction.
func (*Event) Descriptor ¶
func (*Event) GetAttributes ¶
func (m *Event) GetAttributes() []*EventAttribute
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type EventAttribute ¶
type EventAttribute struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
EventAttribute is a single key-value pair, associated with an event.
func (*EventAttribute) Descriptor ¶
func (*EventAttribute) Descriptor() ([]byte, []int)
func (*EventAttribute) GetKey ¶
func (m *EventAttribute) GetKey() string
func (*EventAttribute) GetValue ¶
func (m *EventAttribute) GetValue() string
func (*EventAttribute) Marshal ¶
func (m *EventAttribute) Marshal() (dAtA []byte, err error)
func (*EventAttribute) MarshalToSizedBuffer ¶
func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventAttribute) ProtoMessage ¶
func (*EventAttribute) ProtoMessage()
func (*EventAttribute) Reset ¶
func (m *EventAttribute) Reset()
func (*EventAttribute) Size ¶
func (m *EventAttribute) Size() (n int)
func (*EventAttribute) String ¶
func (m *EventAttribute) String() string
func (*EventAttribute) Unmarshal ¶
func (m *EventAttribute) Unmarshal(dAtA []byte) error
func (*EventAttribute) XXX_DiscardUnknown ¶
func (m *EventAttribute) XXX_DiscardUnknown()
func (*EventAttribute) XXX_Marshal ¶
func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventAttribute) XXX_Merge ¶
func (m *EventAttribute) XXX_Merge(src proto.Message)
func (*EventAttribute) XXX_Size ¶
func (m *EventAttribute) XXX_Size() int
func (*EventAttribute) XXX_Unmarshal ¶
func (m *EventAttribute) XXX_Unmarshal(b []byte) error
type ExecTxResult ¶
type ExecTxResult struct {
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"`
GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
}
ExecTxResult contains results of executing one individual transaction.
func (*ExecTxResult) Descriptor ¶
func (*ExecTxResult) Descriptor() ([]byte, []int)
func (*ExecTxResult) GetCode ¶
func (m *ExecTxResult) GetCode() uint32
func (*ExecTxResult) GetCodespace ¶
func (m *ExecTxResult) GetCodespace() string
func (*ExecTxResult) GetData ¶
func (m *ExecTxResult) GetData() []byte
func (*ExecTxResult) GetEvents ¶
func (m *ExecTxResult) GetEvents() []*Event
func (*ExecTxResult) GetGasUsed ¶
func (m *ExecTxResult) GetGasUsed() int64
func (*ExecTxResult) GetGasWanted ¶
func (m *ExecTxResult) GetGasWanted() int64
func (*ExecTxResult) GetInfo ¶
func (m *ExecTxResult) GetInfo() string
func (*ExecTxResult) GetLog ¶
func (m *ExecTxResult) GetLog() string
func (*ExecTxResult) Marshal ¶
func (m *ExecTxResult) Marshal() (dAtA []byte, err error)
func (*ExecTxResult) MarshalToSizedBuffer ¶
func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ExecTxResult) ProtoMessage ¶
func (*ExecTxResult) ProtoMessage()
func (*ExecTxResult) Reset ¶
func (m *ExecTxResult) Reset()
func (*ExecTxResult) Size ¶
func (m *ExecTxResult) Size() (n int)
func (*ExecTxResult) String ¶
func (m *ExecTxResult) String() string
func (*ExecTxResult) Unmarshal ¶
func (m *ExecTxResult) Unmarshal(dAtA []byte) error
func (*ExecTxResult) XXX_DiscardUnknown ¶
func (m *ExecTxResult) XXX_DiscardUnknown()
func (*ExecTxResult) XXX_Marshal ¶
func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExecTxResult) XXX_Merge ¶
func (m *ExecTxResult) XXX_Merge(src proto.Message)
func (*ExecTxResult) XXX_Size ¶
func (m *ExecTxResult) XXX_Size() int
func (*ExecTxResult) XXX_Unmarshal ¶
func (m *ExecTxResult) XXX_Unmarshal(b []byte) error
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of the ABCIListener interface that talks over RPC.
func (*GRPCClient) ListenDeliverBlock ¶
func (m *GRPCClient) ListenDeliverBlock(goCtx context.Context, req ListenDeliverBlockRequest) error
ListenDeliverBlock listens for block delivery requests and responses. It retrieves a types.Context from the provided context.Context. If the node is configured to stop on listening errors, it will terminate and exit with a non-zero code upon encountering an error.
Panics if a types.Context is not properly attached to the provided context.Context.
func (*GRPCClient) ListenStateChanges ¶
func (m *GRPCClient) ListenStateChanges(goCtx context.Context, changeSet []*StoreKVPair) error
ListenStateChanges listens for state changes in the current block. It retrieves a types.Context from the provided context.Context. If the node is configured to stop on listening errors, it will terminate and exit with a non-zero code upon encountering an error.
Panics if a types.Context is not properly attached to the provided context.Context.
type GRPCServer ¶
type GRPCServer struct {
// This is the real implementation
Impl Listener
}
GRPCServer is the gRPC server that GRPCClient talks to.
func (GRPCServer) ListenDeliverBlock ¶
func (m GRPCServer) ListenDeliverBlock(ctx context.Context, request *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error)
func (GRPCServer) ListenStateChanges ¶
func (m GRPCServer) ListenStateChanges(ctx context.Context, request *ListenStateChangesRequest) (*ListenStateChangesResponse, error)
type ListenDeliverBlockRequest ¶
type ListenDeliverBlockRequest struct {
BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"`
Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"`
}
ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method
func (*ListenDeliverBlockRequest) Descriptor ¶
func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int)
func (*ListenDeliverBlockRequest) GetBlockHeight ¶
func (m *ListenDeliverBlockRequest) GetBlockHeight() int64
func (*ListenDeliverBlockRequest) GetEvents ¶
func (m *ListenDeliverBlockRequest) GetEvents() []*Event
func (*ListenDeliverBlockRequest) GetTxResults ¶
func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult
func (*ListenDeliverBlockRequest) GetTxs ¶
func (m *ListenDeliverBlockRequest) GetTxs() [][]byte
func (*ListenDeliverBlockRequest) Marshal ¶
func (m *ListenDeliverBlockRequest) Marshal() (dAtA []byte, err error)
func (*ListenDeliverBlockRequest) MarshalTo ¶
func (m *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error)
func (*ListenDeliverBlockRequest) MarshalToSizedBuffer ¶
func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenDeliverBlockRequest) ProtoMessage ¶
func (*ListenDeliverBlockRequest) ProtoMessage()
func (*ListenDeliverBlockRequest) Reset ¶
func (m *ListenDeliverBlockRequest) Reset()
func (*ListenDeliverBlockRequest) Size ¶
func (m *ListenDeliverBlockRequest) Size() (n int)
func (*ListenDeliverBlockRequest) String ¶
func (m *ListenDeliverBlockRequest) String() string
func (*ListenDeliverBlockRequest) Unmarshal ¶
func (m *ListenDeliverBlockRequest) Unmarshal(dAtA []byte) error
func (*ListenDeliverBlockRequest) XXX_DiscardUnknown ¶
func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown()
func (*ListenDeliverBlockRequest) XXX_Marshal ¶
func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenDeliverBlockRequest) XXX_Merge ¶
func (m *ListenDeliverBlockRequest) XXX_Merge(src proto.Message)
func (*ListenDeliverBlockRequest) XXX_Size ¶
func (m *ListenDeliverBlockRequest) XXX_Size() int
func (*ListenDeliverBlockRequest) XXX_Unmarshal ¶
func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error
type ListenDeliverBlockResponse ¶
type ListenDeliverBlockResponse struct {
}
ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method
func (*ListenDeliverBlockResponse) Descriptor ¶
func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int)
func (*ListenDeliverBlockResponse) Marshal ¶
func (m *ListenDeliverBlockResponse) Marshal() (dAtA []byte, err error)
func (*ListenDeliverBlockResponse) MarshalTo ¶
func (m *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error)
func (*ListenDeliverBlockResponse) MarshalToSizedBuffer ¶
func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenDeliverBlockResponse) ProtoMessage ¶
func (*ListenDeliverBlockResponse) ProtoMessage()
func (*ListenDeliverBlockResponse) Reset ¶
func (m *ListenDeliverBlockResponse) Reset()
func (*ListenDeliverBlockResponse) Size ¶
func (m *ListenDeliverBlockResponse) Size() (n int)
func (*ListenDeliverBlockResponse) String ¶
func (m *ListenDeliverBlockResponse) String() string
func (*ListenDeliverBlockResponse) Unmarshal ¶
func (m *ListenDeliverBlockResponse) Unmarshal(dAtA []byte) error
func (*ListenDeliverBlockResponse) XXX_DiscardUnknown ¶
func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown()
func (*ListenDeliverBlockResponse) XXX_Marshal ¶
func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenDeliverBlockResponse) XXX_Merge ¶
func (m *ListenDeliverBlockResponse) XXX_Merge(src proto.Message)
func (*ListenDeliverBlockResponse) XXX_Size ¶
func (m *ListenDeliverBlockResponse) XXX_Size() int
func (*ListenDeliverBlockResponse) XXX_Unmarshal ¶
func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error
type ListenStateChangesRequest ¶
type ListenStateChangesRequest struct {
BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"`
AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
}
ListenStateChangesRequest is the request type for the ListenStateChanges RPC method
func (*ListenStateChangesRequest) Descriptor ¶
func (*ListenStateChangesRequest) Descriptor() ([]byte, []int)
func (*ListenStateChangesRequest) GetAppHash ¶
func (m *ListenStateChangesRequest) GetAppHash() []byte
func (*ListenStateChangesRequest) GetBlockHeight ¶
func (m *ListenStateChangesRequest) GetBlockHeight() int64
func (*ListenStateChangesRequest) GetChangeSet ¶
func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair
func (*ListenStateChangesRequest) Marshal ¶
func (m *ListenStateChangesRequest) Marshal() (dAtA []byte, err error)
func (*ListenStateChangesRequest) MarshalTo ¶
func (m *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error)
func (*ListenStateChangesRequest) MarshalToSizedBuffer ¶
func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenStateChangesRequest) ProtoMessage ¶
func (*ListenStateChangesRequest) ProtoMessage()
func (*ListenStateChangesRequest) Reset ¶
func (m *ListenStateChangesRequest) Reset()
func (*ListenStateChangesRequest) Size ¶
func (m *ListenStateChangesRequest) Size() (n int)
func (*ListenStateChangesRequest) String ¶
func (m *ListenStateChangesRequest) String() string
func (*ListenStateChangesRequest) Unmarshal ¶
func (m *ListenStateChangesRequest) Unmarshal(dAtA []byte) error
func (*ListenStateChangesRequest) XXX_DiscardUnknown ¶
func (m *ListenStateChangesRequest) XXX_DiscardUnknown()
func (*ListenStateChangesRequest) XXX_Marshal ¶
func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenStateChangesRequest) XXX_Merge ¶
func (m *ListenStateChangesRequest) XXX_Merge(src proto.Message)
func (*ListenStateChangesRequest) XXX_Size ¶
func (m *ListenStateChangesRequest) XXX_Size() int
func (*ListenStateChangesRequest) XXX_Unmarshal ¶
func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error
type ListenStateChangesResponse ¶
type ListenStateChangesResponse struct {
}
ListenStateChangesResponse is the response type for the ListenStateChanges RPC method
func (*ListenStateChangesResponse) Descriptor ¶
func (*ListenStateChangesResponse) Descriptor() ([]byte, []int)
func (*ListenStateChangesResponse) Marshal ¶
func (m *ListenStateChangesResponse) Marshal() (dAtA []byte, err error)
func (*ListenStateChangesResponse) MarshalTo ¶
func (m *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error)
func (*ListenStateChangesResponse) MarshalToSizedBuffer ¶
func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenStateChangesResponse) ProtoMessage ¶
func (*ListenStateChangesResponse) ProtoMessage()
func (*ListenStateChangesResponse) Reset ¶
func (m *ListenStateChangesResponse) Reset()
func (*ListenStateChangesResponse) Size ¶
func (m *ListenStateChangesResponse) Size() (n int)
func (*ListenStateChangesResponse) String ¶
func (m *ListenStateChangesResponse) String() string
func (*ListenStateChangesResponse) Unmarshal ¶
func (m *ListenStateChangesResponse) Unmarshal(dAtA []byte) error
func (*ListenStateChangesResponse) XXX_DiscardUnknown ¶
func (m *ListenStateChangesResponse) XXX_DiscardUnknown()
func (*ListenStateChangesResponse) XXX_Marshal ¶
func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenStateChangesResponse) XXX_Merge ¶
func (m *ListenStateChangesResponse) XXX_Merge(src proto.Message)
func (*ListenStateChangesResponse) XXX_Size ¶
func (m *ListenStateChangesResponse) XXX_Size() int
func (*ListenStateChangesResponse) XXX_Unmarshal ¶
func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error
type Listener ¶
type Listener interface {
// ListenDeliverBlock updates the streaming service with the latest Delivered Block messages.
ListenDeliverBlock(context.Context, ListenDeliverBlockRequest) error
// ListenStateChanges updates the streaming service with the latest Commit messages and state changes.
ListenStateChanges(ctx context.Context, changeSet []*StoreKVPair) error
}
Listener defines the interface for a streaming service that hooks into the ABCI message processing of the BaseApp. Implementations should handle errors internally and return nil if they don't want to affect consensus.
type ListenerConfig ¶
type ListenerConfig struct {
// List of kv store keys to stream out via gRPC.
// The store key names MUST match the module's StoreKey name.
//
// Example:
// ["acc", "bank", "gov", "staking", "mint"[,...]]
// ["*"] to expose all keys.
Keys []string `` /* 241-byte string literal not displayed */
// The plugin name used for streaming via gRPC.
// Streaming is only enabled if this is set.
// Supported plugins: abci
Plugin string `` /* 156-byte string literal not displayed */
// stop-node-on-err specifies whether to stop the node on message delivery error.
StopNodeOnErr bool `` /* 144-byte string literal not displayed */
}
ListenerConfig defines application configuration for ABCIListener streaming service
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 Listener
}
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)
GRPCClient creates a new ListenerService client.
func (*ListenerGRPCPlugin) GRPCServer ¶
func (p *ListenerGRPCPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer registers the ListenerService server implementation.
type ListenerServiceClient ¶
type ListenerServiceClient interface {
// ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock
ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error)
// ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges
ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error)
}
ListenerServiceClient is the client API for ListenerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewListenerServiceClient ¶
func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient
type ListenerServiceServer ¶
type ListenerServiceServer interface {
// ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock
ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error)
// ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges
ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error)
}
ListenerServiceServer is the server API for ListenerService service.
type Manager ¶
type Manager struct {
// Listeners for hooking into the message processing of the server
// and exposing the requests and responses to external consumers
Listeners []Listener
// StopNodeOnErr halts the node when ABCI streaming service listening results in an error.
StopNodeOnErr bool
}
Manager is the struct that maintains a list of ABCIListeners and configuration settings.
type StoreKVPair ¶
type StoreKVPair struct {
// address defines the address of the account the state changes are coming from.
// In case of modules you can expect a stringified
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// key defines the key of the address that changed.
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// value defines the value that changed, empty in case of removal.
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
// delete defines if the key was removed.
Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"`
}
StoreKVPair is a single key-value pair, associated with a store.
func (*StoreKVPair) Descriptor ¶
func (*StoreKVPair) Descriptor() ([]byte, []int)
func (*StoreKVPair) GetAddress ¶
func (m *StoreKVPair) GetAddress() []byte
func (*StoreKVPair) GetDelete ¶
func (m *StoreKVPair) GetDelete() bool
func (*StoreKVPair) GetKey ¶
func (m *StoreKVPair) GetKey() []byte
func (*StoreKVPair) GetValue ¶
func (m *StoreKVPair) GetValue() []byte
func (*StoreKVPair) Marshal ¶
func (m *StoreKVPair) Marshal() (dAtA []byte, err error)
func (*StoreKVPair) MarshalToSizedBuffer ¶
func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StoreKVPair) ProtoMessage ¶
func (*StoreKVPair) ProtoMessage()
func (*StoreKVPair) Reset ¶
func (m *StoreKVPair) Reset()
func (*StoreKVPair) Size ¶
func (m *StoreKVPair) Size() (n int)
func (*StoreKVPair) String ¶
func (m *StoreKVPair) String() string
func (*StoreKVPair) Unmarshal ¶
func (m *StoreKVPair) Unmarshal(dAtA []byte) error
func (*StoreKVPair) XXX_DiscardUnknown ¶
func (m *StoreKVPair) XXX_DiscardUnknown()
func (*StoreKVPair) XXX_Marshal ¶
func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StoreKVPair) XXX_Merge ¶
func (m *StoreKVPair) XXX_Merge(src proto.Message)
func (*StoreKVPair) XXX_Size ¶
func (m *StoreKVPair) XXX_Size() int
func (*StoreKVPair) XXX_Unmarshal ¶
func (m *StoreKVPair) XXX_Unmarshal(b []byte) error
type StreamingConfig ¶
type StreamingConfig struct {
ListenerConfig ListenerConfig `` /* 147-byte string literal not displayed */
}
StreamingConfig defines application configuration for external streaming services
type UnimplementedListenerServiceServer ¶
type UnimplementedListenerServiceServer struct {
}
UnimplementedListenerServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedListenerServiceServer) ListenDeliverBlock ¶
func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error)
func (*UnimplementedListenerServiceServer) ListenStateChanges ¶
func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error)