burrow: github.com/hyperledger/burrow/dump Index | Files

package dump

import "github.com/hyperledger/burrow/dump"

Index

Package Files

dump.go dump.pb.go load.go mock.go pipe.go sink.go source.go

Variables

var (
    ErrInvalidLengthDump        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowDump          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupDump = fmt.Errorf("proto: unexpected end of group")
)

func Load Uses

func Load(source Source, st *state.State) error

Load a dump into state

func Write Uses

func Write(out io.Writer, source Source, useBinaryEncoding bool, options Option) error

Write a dump to the Writer out by pulling rows from stream

type AccountStorage Uses

type AccountStorage struct {
    Address              github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"`
    Storage              []*Storage                                   `protobuf:"bytes,2,rep,name=Storage,proto3" json:"Storage,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                                     `json:"-"`
    XXX_unrecognized     []byte                                       `json:"-"`
    XXX_sizecache        int32                                        `json:"-"`
}

func (*AccountStorage) Descriptor Uses

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

func (*AccountStorage) GetStorage Uses

func (m *AccountStorage) GetStorage() []*Storage

func (*AccountStorage) Marshal Uses

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

func (*AccountStorage) MarshalTo Uses

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

func (*AccountStorage) MarshalToSizedBuffer Uses

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

func (*AccountStorage) ProtoMessage Uses

func (*AccountStorage) ProtoMessage()

func (*AccountStorage) Reset Uses

func (m *AccountStorage) Reset()

func (*AccountStorage) Size Uses

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

func (*AccountStorage) String Uses

func (m *AccountStorage) String() string

func (*AccountStorage) Unmarshal Uses

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

func (*AccountStorage) XXX_DiscardUnknown Uses

func (m *AccountStorage) XXX_DiscardUnknown()

func (*AccountStorage) XXX_Marshal Uses

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

func (*AccountStorage) XXX_Merge Uses

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

func (*AccountStorage) XXX_MessageName Uses

func (*AccountStorage) XXX_MessageName() string

func (*AccountStorage) XXX_Size Uses

func (m *AccountStorage) XXX_Size() int

func (*AccountStorage) XXX_Unmarshal Uses

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

type Blockchain Uses

type Blockchain interface {
    ChainID() string
    LastBlockHeight() uint64
}

type CollectSink Uses

type CollectSink struct {
    Rows    []string
    Current int
}

func (*CollectSink) Recv Uses

func (c *CollectSink) Recv() (d *Dump, err error)

func (*CollectSink) Send Uses

func (c *CollectSink) Send(d *Dump) error

type Dump Uses

type Dump struct {
    Height               uint64          `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
    Account              *acm.Account    `protobuf:"bytes,2,opt,name=Account,proto3" json:"Account,omitempty"`
    AccountStorage       *AccountStorage `protobuf:"bytes,3,opt,name=AccountStorage,proto3" json:"AccountStorage,omitempty"`
    EVMEvent             *EVMEvent       `protobuf:"bytes,4,opt,name=EVMEvent,proto3" json:"EVMEvent,omitempty"`
    Name                 *names.Entry    `protobuf:"bytes,5,opt,name=Name,proto3" json:"Name,omitempty"`
    XXX_NoUnkeyedLiteral struct{}        `json:"-"`
    XXX_unrecognized     []byte          `json:"-"`
    XXX_sizecache        int32           `json:"-"`
}

func (*Dump) Descriptor Uses

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

func (*Dump) GetAccount Uses

func (m *Dump) GetAccount() *acm.Account

func (*Dump) GetAccountStorage Uses

func (m *Dump) GetAccountStorage() *AccountStorage

func (*Dump) GetEVMEvent Uses

func (m *Dump) GetEVMEvent() *EVMEvent

func (*Dump) GetHeight Uses

func (m *Dump) GetHeight() uint64

func (*Dump) GetName Uses

func (m *Dump) GetName() *names.Entry

func (*Dump) Marshal Uses

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

func (*Dump) MarshalTo Uses

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

func (*Dump) MarshalToSizedBuffer Uses

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

func (*Dump) ProtoMessage Uses

func (*Dump) ProtoMessage()

func (*Dump) Reset Uses

func (m *Dump) Reset()

func (*Dump) Size Uses

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

func (*Dump) String Uses

func (m *Dump) String() string

func (*Dump) Unmarshal Uses

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

func (*Dump) XXX_DiscardUnknown Uses

func (m *Dump) XXX_DiscardUnknown()

func (*Dump) XXX_Marshal Uses

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

func (*Dump) XXX_Merge Uses

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

func (*Dump) XXX_MessageName Uses

func (*Dump) XXX_MessageName() string

func (*Dump) XXX_Size Uses

func (m *Dump) XXX_Size() int

func (*Dump) XXX_Unmarshal Uses

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

type Dumper Uses

type Dumper struct {
    // contains filtered or unexported fields
}

func NewDumper Uses

func NewDumper(state *state.State, blockchain Blockchain) *Dumper

Return a Dumper that can Transmit Dump rows to a Sink by pulling them out of the the provided State

func (*Dumper) Source Uses

func (ds *Dumper) Source(startHeight, endHeight uint64, options Option) Source

Return a Source that is a Pipe fed from this Dumper's Transmit function

func (*Dumper) Transmit Uses

func (ds *Dumper) Transmit(sink Sink, startHeight, endHeight uint64, options Option) error

func (*Dumper) WithLogger Uses

func (ds *Dumper) WithLogger(logger *logging.Logger) *Dumper

type EVMEvent Uses

type EVMEvent struct {
    // The original ChainID from for this event
    ChainID string `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
    // The original index for this event
    Index uint64 `protobuf:"varint,4,opt,name=Index,proto3" json:"Index,omitempty"`
    // The original block time for this transaction
    Time time.Time `protobuf:"bytes,2,opt,name=Time,proto3,stdtime" json:"Time"`
    // The event itself
    Event                *exec.LogEvent `protobuf:"bytes,3,opt,name=Event,proto3" json:"Event,omitempty"`
    XXX_NoUnkeyedLiteral struct{}       `json:"-"`
    XXX_unrecognized     []byte         `json:"-"`
    XXX_sizecache        int32          `json:"-"`
}

func (*EVMEvent) Descriptor Uses

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

func (*EVMEvent) GetChainID Uses

func (m *EVMEvent) GetChainID() string

func (*EVMEvent) GetEvent Uses

func (m *EVMEvent) GetEvent() *exec.LogEvent

func (*EVMEvent) GetIndex Uses

func (m *EVMEvent) GetIndex() uint64

func (*EVMEvent) GetTime Uses

func (m *EVMEvent) GetTime() time.Time

func (*EVMEvent) Marshal Uses

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

func (*EVMEvent) MarshalTo Uses

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

func (*EVMEvent) MarshalToSizedBuffer Uses

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

func (*EVMEvent) ProtoMessage Uses

func (*EVMEvent) ProtoMessage()

func (*EVMEvent) Reset Uses

func (m *EVMEvent) Reset()

func (*EVMEvent) Size Uses

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

func (*EVMEvent) String Uses

func (m *EVMEvent) String() string

func (*EVMEvent) Unmarshal Uses

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

func (*EVMEvent) XXX_DiscardUnknown Uses

func (m *EVMEvent) XXX_DiscardUnknown()

func (*EVMEvent) XXX_Marshal Uses

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

func (*EVMEvent) XXX_Merge Uses

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

func (*EVMEvent) XXX_MessageName Uses

func (*EVMEvent) XXX_MessageName() string

func (*EVMEvent) XXX_Size Uses

func (m *EVMEvent) XXX_Size() int

func (*EVMEvent) XXX_Unmarshal Uses

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

type MockSource Uses

type MockSource struct {
    Accounts   int
    MaxStorage int
    Names      int
    Events     int
    *Mockchain
    // contains filtered or unexported fields
}

func NewMockSource Uses

func NewMockSource(accounts, maxStorage, names, events int) *MockSource

func (*MockSource) Recv Uses

func (m *MockSource) Recv() (*Dump, error)

type Mockchain Uses

type Mockchain struct {
    // contains filtered or unexported fields
}

func NewMockchain Uses

func NewMockchain(chainID string, lastBlockHeight uint64) *Mockchain

func (*Mockchain) ChainID Uses

func (mc *Mockchain) ChainID() string

func (*Mockchain) LastBlockHeight Uses

func (mc *Mockchain) LastBlockHeight() uint64

type NullSink Uses

type NullSink struct{}

func (NullSink) Send Uses

func (NullSink) Send(*Dump) error

type Option Uses

type Option uint64
const (
    // Whether to send/receive these classes of data
    Accounts Option = 1 << iota
    Names
    Events
)
const (
    None Option = 0
    All         = Accounts | Names | Events
)

func (Option) Enabled Uses

func (options Option) Enabled(option Option) bool

type Pipe Uses

type Pipe chan msg

Implements both Sink and Source

func (Pipe) Recv Uses

func (p Pipe) Recv() (*Dump, error)

func (Pipe) Send Uses

func (p Pipe) Send(dump *Dump) error

type Sink Uses

type Sink interface {
    Send(*Dump) error
}

type Source Uses

type Source interface {
    Recv() (*Dump, error)
}

func NewFileReader Uses

func NewFileReader(filename string) (Source, error)

type Storage Uses

type Storage struct {
    Key                  github_com_hyperledger_burrow_binary.Word256  `protobuf:"bytes,1,opt,name=Key,proto3,customtype=github.com/hyperledger/burrow/binary.Word256" json:"Key"`
    Value                github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,2,opt,name=Value,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"Value"`
    XXX_NoUnkeyedLiteral struct{}                                      `json:"-"`
    XXX_unrecognized     []byte                                        `json:"-"`
    XXX_sizecache        int32                                         `json:"-"`
}

func (*Storage) Descriptor Uses

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

func (*Storage) Marshal Uses

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

func (*Storage) MarshalTo Uses

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

func (*Storage) MarshalToSizedBuffer Uses

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

func (*Storage) ProtoMessage Uses

func (*Storage) ProtoMessage()

func (*Storage) Reset Uses

func (m *Storage) Reset()

func (*Storage) Size Uses

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

func (*Storage) String Uses

func (m *Storage) String() string

func (*Storage) Unmarshal Uses

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

func (*Storage) XXX_DiscardUnknown Uses

func (m *Storage) XXX_DiscardUnknown()

func (*Storage) XXX_Marshal Uses

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

func (*Storage) XXX_Merge Uses

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

func (*Storage) XXX_MessageName Uses

func (*Storage) XXX_MessageName() string

func (*Storage) XXX_Size Uses

func (m *Storage) XXX_Size() int

func (*Storage) XXX_Unmarshal Uses

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

type StreamReader Uses

type StreamReader struct {
    // contains filtered or unexported fields
}

func NewJSONReader Uses

func NewJSONReader(reader io.Reader) (*StreamReader, error)

func NewProtobufReader Uses

func NewProtobufReader(reader io.Reader) (*StreamReader, error)

func NewStreamReader Uses

func NewStreamReader(reader io.Reader, decode func(*Dump) error) (*StreamReader, error)

func (*StreamReader) Recv Uses

func (sr *StreamReader) Recv() (*Dump, error)

Package dump imports 27 packages (graph) and is imported by 12 packages. Updated 2020-04-26. Refresh now. Tools for package owners.