streaming

package
v2.0.0-...-fbd725d Latest Latest
Warning

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

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

README

Cosmos-SDK Plugins

This package contains an extensible plugin system for the Cosmos-SDK. The plugin system leverages the hashicorp/go-plugin system. This system is designed to work over RPC.

Although the go-plugin is built to work over RPC, it is currently only designed to work over a local network.

Pre requisites

For an overview of supported features by the go-plugin system, please see https://github.com/hashicorp/go-plugin. The go-plugin documentation is located here. You can also directly visit any of the links below:

Exposing plugins

To expose plugins to the plugin system, you will need to:

  1. Implement the gRPC message protocol service of the plugin
  2. Build the plugin binary
  3. Export it

Read the plugin documentation in the Streaming Plugins section for examples on how to build a plugin.

Streaming Plugins

List of support streaming plugins

Documentation

Overview

Package streaming provides shared data structures and interfaces for communication between the host application and plugins in a streaming context.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthGrpc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGrpc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group")
)
View Source
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.

View Source
var HandshakeMap = map[string]plugin.HandshakeConfig{
	// contains filtered or unexported fields
}

HandshakeMap contains a map of each supported streaming's handshake config

View Source
var ListenerService_serviceDesc = _ListenerService_serviceDesc
View Source
var PluginMap = map[string]plugin.Plugin{
	// contains filtered or unexported fields
}

PluginMap contains a map of supported gRPC plugins

Functions

func GetPluginEnvKey

func GetPluginEnvKey(name string) string

func NewStreamingPlugin

func NewStreamingPlugin(name, logLevel string) (interface{}, error)

func RegisterListenerServiceServer

func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer)

Types

type Context

type Context interface {
	BlockHeight() int64
	Logger() log.Logger
	StreamingManager() Manager
}

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 IntoStreamingEvents

func IntoStreamingEvents(events []event.Event) ([]*Event, error)

func (*Event) Descriptor

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

func (*Event) GetAttributes

func (m *Event) GetAttributes() []*EventAttribute

func (*Event) GetType

func (m *Event) GetType() string

func (*Event) Marshal

func (m *Event) Marshal() (dAtA []byte, err error)

func (*Event) MarshalTo

func (m *Event) MarshalTo(dAtA []byte) (int, error)

func (*Event) MarshalToSizedBuffer

func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) String

func (m *Event) String() string

func (*Event) Unmarshal

func (m *Event) Unmarshal(dAtA []byte) error

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

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

func (*Event) XXX_Merge

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

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

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

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) MarshalTo

func (m *EventAttribute) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *ExecTxResult) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *StoreKVPair) MarshalTo(dAtA []byte) (int, 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) ListenStateChanges

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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