rpcevents

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package rpcevents is a generated protocol buffer package.

It is generated from these files:

rpcevents.proto

It has these top-level messages:

GetBlockRequest
GetTxRequest
BlocksRequest
GetEventsResponse
GetTxsResponse
Bound
BlockRange

Index

Constants

View Source
const SubscribeBufferSize = 100

Variables

View Source
var (
	ErrInvalidLengthRpcevents = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpcevents   = fmt.Errorf("proto: integer overflow")
)
View Source
var Bound_BoundType_name = map[int32]string{
	0: "ABSOLUTE",
	1: "RELATIVE",
	2: "FIRST",
	3: "LATEST",
	4: "STREAM",
}
View Source
var Bound_BoundType_value = map[string]int32{
	"ABSOLUTE": 0,
	"RELATIVE": 1,
	"FIRST":    2,
	"LATEST":   3,
	"STREAM":   4,
}

Functions

func RegisterExecutionEventsServer added in v0.20.0

func RegisterExecutionEventsServer(s *grpc.Server, srv ExecutionEventsServer)

Types

type BlockRange added in v0.20.0

type BlockRange struct {
	// Bounds can be set to:
	// absolute: block height
	// relative: block height counting back from latest
	// latest: latest block when call is processed
	// stream: for End keep sending new blocks, for start same as latest
	Start *Bound `protobuf:"bytes,1,opt,name=Start" json:"Start,omitempty"`
	End   *Bound `protobuf:"bytes,2,opt,name=End" json:"End,omitempty"`
}

An inclusive range of blocks to include in output

func NewBlockRange added in v0.20.0

func NewBlockRange(start, end *Bound) *BlockRange

func (*BlockRange) Bounds added in v0.20.0

func (br *BlockRange) Bounds(latestBlockHeight uint64) (startHeight, endHeight uint64, streaming bool)

Get bounds suitable for events.Provider

func (*BlockRange) Descriptor added in v0.20.0

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

func (*BlockRange) GetEnd added in v0.20.0

func (m *BlockRange) GetEnd() *Bound

func (*BlockRange) GetStart added in v0.20.0

func (m *BlockRange) GetStart() *Bound

func (*BlockRange) Marshal added in v0.20.0

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

func (*BlockRange) MarshalTo added in v0.20.0

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

func (*BlockRange) ProtoMessage added in v0.20.0

func (*BlockRange) ProtoMessage()

func (*BlockRange) Reset added in v0.20.0

func (m *BlockRange) Reset()

func (*BlockRange) Size added in v0.20.0

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

func (*BlockRange) String added in v0.20.0

func (m *BlockRange) String() string

func (*BlockRange) Unmarshal added in v0.20.0

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

func (*BlockRange) XXX_MessageName added in v0.20.0

func (*BlockRange) XXX_MessageName() string

type BlocksRequest added in v0.20.0

type BlocksRequest struct {
	BlockRange *BlockRange `protobuf:"bytes,1,opt,name=BlockRange" json:"BlockRange,omitempty"`
	// Specify a query on which to match the tags of events.
	// Tag        | Match type | Values
	// -----------------------------------------
	//   All events
	// -----------------------------------------
	// TxType       | String     | "UnknownTx", "SendTx", "CallTx", "NameTx", "BondTx", "UnbondTx", "PermissionsTx", "GovernanceTx"
	// TxHash       | String     | bytes
	// EventType    | String     | "CallEvent", "LogEvent", "AccountInputEvent", "AccountOutputEvent"
	// EventID      | String     | string
	// Height       | Integer    | uint64
	// Index        | Integer    | uint64
	// MessageType  | String     | Go type name
	// -----------------------------------------
	//   Log event
	// -----------------------------------------
	// Address      | String     | Address (hex)
	// Log<0-4>     | String     | Word256 (hex)
	// Log<0-4>Text | String     | string (trimmed)
	// -----------------------------------------
	//   Call event
	// -----------------------------------------
	// Origin       | String     | Address (hex)
	// Callee       | String     | Address (hex)
	// Caller       | String     | Address (hex)
	// Value        | Integer    | uint64
	// Gas          | Integer    | uint64
	// StackDepth   | Integer    | uint64
	// Exception    | String     | string
	// -----------------------------------------
	//   Tx event (input/output)
	// -----------------------------------------
	// Exception  | String     | string
	//
	// For example:
	// EventType = 'LogEvent' AND EventID CONTAINS 'bar' AND TxHash = '020304' AND Height >= 34 AND Index < 3 AND Address = 'DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF'
	Query string `protobuf:"bytes,2,opt,name=Query,proto3" json:"Query,omitempty"`
}

func (*BlocksRequest) Descriptor added in v0.20.0

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

func (*BlocksRequest) GetBlockRange added in v0.20.0

func (m *BlocksRequest) GetBlockRange() *BlockRange

func (*BlocksRequest) GetQuery added in v0.20.0

func (m *BlocksRequest) GetQuery() string

func (*BlocksRequest) Marshal added in v0.20.0

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

func (*BlocksRequest) MarshalTo added in v0.20.0

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

func (*BlocksRequest) ProtoMessage added in v0.20.0

func (*BlocksRequest) ProtoMessage()

func (*BlocksRequest) Reset added in v0.20.0

func (m *BlocksRequest) Reset()

func (*BlocksRequest) Size added in v0.20.0

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

func (*BlocksRequest) String added in v0.20.0

func (m *BlocksRequest) String() string

func (*BlocksRequest) Unmarshal added in v0.20.0

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

func (*BlocksRequest) XXX_MessageName added in v0.20.0

func (*BlocksRequest) XXX_MessageName() string

type Bound added in v0.20.0

type Bound struct {
	Type  Bound_BoundType `protobuf:"varint,1,opt,name=Type,proto3,enum=rpcevents.Bound_BoundType" json:"Type,omitempty"`
	Index uint64          `protobuf:"varint,2,opt,name=Index,proto3" json:"Index,omitempty"`
}

func AbsoluteBound added in v0.20.0

func AbsoluteBound(index uint64) *Bound

func LatestBound added in v0.20.0

func LatestBound() *Bound

func RelativeBound added in v0.20.0

func RelativeBound(index uint64) *Bound

func StreamBound added in v0.20.0

func StreamBound() *Bound

func (*Bound) Bound added in v0.20.0

func (b *Bound) Bound(latestBlockHeight uint64) uint64

func (*Bound) Descriptor added in v0.20.0

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

func (*Bound) GetIndex added in v0.20.0

func (m *Bound) GetIndex() uint64

func (*Bound) GetType added in v0.20.0

func (m *Bound) GetType() Bound_BoundType

func (*Bound) Marshal added in v0.20.0

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

func (*Bound) MarshalTo added in v0.20.0

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

func (*Bound) ProtoMessage added in v0.20.0

func (*Bound) ProtoMessage()

func (*Bound) Reset added in v0.20.0

func (m *Bound) Reset()

func (*Bound) Size added in v0.20.0

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

func (*Bound) String added in v0.20.0

func (m *Bound) String() string

func (*Bound) Unmarshal added in v0.20.0

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

func (*Bound) XXX_MessageName added in v0.20.0

func (*Bound) XXX_MessageName() string

type Bound_BoundType added in v0.20.0

type Bound_BoundType int32
const (
	// Index is absolute index of an item
	Bound_ABSOLUTE Bound_BoundType = 0
	// Index is an offset relative to last item
	Bound_RELATIVE Bound_BoundType = 1
	// The first block
	Bound_FIRST Bound_BoundType = 2
	// Ignore provided index and evaluate to latest index
	Bound_LATEST Bound_BoundType = 3
	// Ignore provided index and stream new objects as they are generated
	Bound_STREAM Bound_BoundType = 4
)

func (Bound_BoundType) EnumDescriptor added in v0.20.0

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

func (Bound_BoundType) String added in v0.20.0

func (x Bound_BoundType) String() string

type ExecutionEventsClient added in v0.20.0

type ExecutionEventsClient interface {
	// Get Blockexecution at particular height
	GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*exec.BlockExecution, error)
	// Get BlockExecutions for a range of blocks
	GetBlocks(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_GetBlocksClient, error)
	// Get a particular TxExecution
	GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*exec.TxExecution, error)
	// Get TxExecutions for a range of block
	GetTxs(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_GetTxsClient, error)
	// GetEvents provides events streaming one block at a time - that is all events emitted in a particular block
	// are guaranteed to be delivered in each GetEventsResponse
	GetEvents(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_GetEventsClient, error)
}

func NewExecutionEventsClient added in v0.20.0

func NewExecutionEventsClient(cc *grpc.ClientConn) ExecutionEventsClient

type ExecutionEventsServer added in v0.20.0

type ExecutionEventsServer interface {
	// Get Blockexecution at particular height
	GetBlock(context.Context, *GetBlockRequest) (*exec.BlockExecution, error)
	// Get BlockExecutions for a range of blocks
	GetBlocks(*BlocksRequest, ExecutionEvents_GetBlocksServer) error
	// Get a particular TxExecution
	GetTx(context.Context, *GetTxRequest) (*exec.TxExecution, error)
	// Get TxExecutions for a range of block
	GetTxs(*BlocksRequest, ExecutionEvents_GetTxsServer) error
	// GetEvents provides events streaming one block at a time - that is all events emitted in a particular block
	// are guaranteed to be delivered in each GetEventsResponse
	GetEvents(*BlocksRequest, ExecutionEvents_GetEventsServer) error
}

func NewExecutionEventsServer

func NewExecutionEventsServer(eventsProvider Provider, subscribable event.Subscribable,
	tip bcm.BlockchainInfo, logger *logging.Logger) ExecutionEventsServer

type ExecutionEvents_GetBlocksClient added in v0.20.0

type ExecutionEvents_GetBlocksClient interface {
	Recv() (*exec.BlockExecution, error)
	grpc.ClientStream
}

type ExecutionEvents_GetBlocksServer added in v0.20.0

type ExecutionEvents_GetBlocksServer interface {
	Send(*exec.BlockExecution) error
	grpc.ServerStream
}

type ExecutionEvents_GetEventsClient added in v0.20.0

type ExecutionEvents_GetEventsClient interface {
	Recv() (*GetEventsResponse, error)
	grpc.ClientStream
}

type ExecutionEvents_GetEventsServer added in v0.20.0

type ExecutionEvents_GetEventsServer interface {
	Send(*GetEventsResponse) error
	grpc.ServerStream
}

type ExecutionEvents_GetTxsClient added in v0.20.0

type ExecutionEvents_GetTxsClient interface {
	Recv() (*GetTxsResponse, error)
	grpc.ClientStream
}

type ExecutionEvents_GetTxsServer added in v0.20.0

type ExecutionEvents_GetTxsServer interface {
	Send(*GetTxsResponse) error
	grpc.ServerStream
}

type GetBlockRequest added in v0.20.0

type GetBlockRequest struct {
	// Height of block required
	Height uint64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
	// Whether to wait for the block to become available
	Wait bool `protobuf:"varint,2,opt,name=Wait,proto3" json:"Wait,omitempty"`
}

func (*GetBlockRequest) Descriptor added in v0.20.0

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

func (*GetBlockRequest) GetHeight added in v0.20.0

func (m *GetBlockRequest) GetHeight() uint64

func (*GetBlockRequest) GetWait added in v0.20.0

func (m *GetBlockRequest) GetWait() bool

func (*GetBlockRequest) Marshal added in v0.20.0

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

func (*GetBlockRequest) MarshalTo added in v0.20.0

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

func (*GetBlockRequest) ProtoMessage added in v0.20.0

func (*GetBlockRequest) ProtoMessage()

func (*GetBlockRequest) Reset added in v0.20.0

func (m *GetBlockRequest) Reset()

func (*GetBlockRequest) Size added in v0.20.0

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

func (*GetBlockRequest) String added in v0.20.0

func (m *GetBlockRequest) String() string

func (*GetBlockRequest) Unmarshal added in v0.20.0

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

func (*GetBlockRequest) XXX_MessageName added in v0.20.0

func (*GetBlockRequest) XXX_MessageName() string

type GetEventsResponse added in v0.20.0

type GetEventsResponse struct {
	Height uint64        `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
	Events []*exec.Event `protobuf:"bytes,2,rep,name=Events" json:"Events,omitempty"`
}

func (*GetEventsResponse) Descriptor added in v0.20.0

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

func (*GetEventsResponse) GetEvents added in v0.20.0

func (m *GetEventsResponse) GetEvents() []*exec.Event

func (*GetEventsResponse) GetHeight added in v0.20.0

func (m *GetEventsResponse) GetHeight() uint64

func (*GetEventsResponse) Marshal added in v0.20.0

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

func (*GetEventsResponse) MarshalTo added in v0.20.0

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

func (*GetEventsResponse) ProtoMessage added in v0.20.0

func (*GetEventsResponse) ProtoMessage()

func (*GetEventsResponse) Reset added in v0.20.0

func (m *GetEventsResponse) Reset()

func (*GetEventsResponse) Size added in v0.20.0

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

func (*GetEventsResponse) String added in v0.20.0

func (m *GetEventsResponse) String() string

func (*GetEventsResponse) Unmarshal added in v0.20.0

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

func (*GetEventsResponse) XXX_MessageName added in v0.20.0

func (*GetEventsResponse) XXX_MessageName() string

type GetTxRequest added in v0.20.0

type GetTxRequest struct {
	// Height of block required
	TxHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,1,opt,name=TxHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"TxHash"`
	// Whether to wait for the block to become available
	Wait bool `protobuf:"varint,2,opt,name=Wait,proto3" json:"Wait,omitempty"`
}

func (*GetTxRequest) Descriptor added in v0.20.0

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

func (*GetTxRequest) GetWait added in v0.20.0

func (m *GetTxRequest) GetWait() bool

func (*GetTxRequest) Marshal added in v0.20.0

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

func (*GetTxRequest) MarshalTo added in v0.20.0

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

func (*GetTxRequest) ProtoMessage added in v0.20.0

func (*GetTxRequest) ProtoMessage()

func (*GetTxRequest) Reset added in v0.20.0

func (m *GetTxRequest) Reset()

func (*GetTxRequest) Size added in v0.20.0

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

func (*GetTxRequest) String added in v0.20.0

func (m *GetTxRequest) String() string

func (*GetTxRequest) Unmarshal added in v0.20.0

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

func (*GetTxRequest) XXX_MessageName added in v0.20.0

func (*GetTxRequest) XXX_MessageName() string

type GetTxsResponse added in v0.20.0

type GetTxsResponse struct {
	Height       uint64              `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
	TxExecutions []*exec.TxExecution `protobuf:"bytes,2,rep,name=TxExecutions" json:"TxExecutions,omitempty"`
}

func (*GetTxsResponse) Descriptor added in v0.20.0

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

func (*GetTxsResponse) GetHeight added in v0.20.0

func (m *GetTxsResponse) GetHeight() uint64

func (*GetTxsResponse) GetTxExecutions added in v0.20.0

func (m *GetTxsResponse) GetTxExecutions() []*exec.TxExecution

func (*GetTxsResponse) Marshal added in v0.20.0

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

func (*GetTxsResponse) MarshalTo added in v0.20.0

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

func (*GetTxsResponse) ProtoMessage added in v0.20.0

func (*GetTxsResponse) ProtoMessage()

func (*GetTxsResponse) Reset added in v0.20.0

func (m *GetTxsResponse) Reset()

func (*GetTxsResponse) Size added in v0.20.0

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

func (*GetTxsResponse) String added in v0.20.0

func (m *GetTxsResponse) String() string

func (*GetTxsResponse) Unmarshal added in v0.20.0

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

func (*GetTxsResponse) XXX_MessageName added in v0.20.0

func (*GetTxsResponse) XXX_MessageName() string

type Provider added in v0.20.0

type Provider interface {
	// Get a particular BlockExecution
	GetBlock(height uint64) (*exec.BlockExecution, error)
	// Get a partiualr TxExecution by hash
	GetTx(txHash []byte) (*exec.TxExecution, error)
	// Get events between startKey (inclusive) and endKey (exclusive) - i.e. the half open interval [start, end)
	GetBlocks(startHeight, endHeight uint64, consumer func(*exec.BlockExecution) (stop bool)) (stopped bool, err error)
}

Jump to

Keyboard shortcuts

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