ogsyncer_interface

package
v0.0.0-...-a53bfeb Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceTypeStrings = map[ResourceType]string{
	ResourceTypeTx:        "RTx",
	ResourceTypeSequencer: "RTs",
	ResourceTypeInt:       "RTi",
}

Functions

This section is empty.

Types

type MessageContentInt

type MessageContentInt struct {
	Height      int64
	Step        int
	PreviousSum int
	MySum       int
	Submitter   int
}

msgp MessageContentInt

func (*MessageContentInt) DecodeMsg

func (z *MessageContentInt) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MessageContentInt) EncodeMsg

func (z *MessageContentInt) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MessageContentInt) FromBytes

func (z *MessageContentInt) FromBytes(bts []byte) error

func (*MessageContentInt) MarshalMsg

func (z *MessageContentInt) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MessageContentInt) Msgsize

func (z *MessageContentInt) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MessageContentInt) ToBytes

func (z *MessageContentInt) ToBytes() []byte

func (*MessageContentInt) UnmarshalMsg

func (z *MessageContentInt) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MessageContentSequencer

type MessageContentSequencer struct {
	Hash         []byte
	ParentsHash  [][]byte
	MineNonce    uint64
	AccountNonce uint64
	Issuer       []byte
	PublicKey    []byte
	Signature    []byte
	StateRoot    []byte
	Height       uint64
}

msgp MessageContentSequencer

func (*MessageContentSequencer) DecodeMsg

func (z *MessageContentSequencer) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MessageContentSequencer) EncodeMsg

func (z *MessageContentSequencer) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MessageContentSequencer) FromBytes

func (z *MessageContentSequencer) FromBytes(bts []byte) error

func (*MessageContentSequencer) MarshalMsg

func (z *MessageContentSequencer) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MessageContentSequencer) Msgsize

func (z *MessageContentSequencer) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MessageContentSequencer) ToBytes

func (z *MessageContentSequencer) ToBytes() []byte

func (*MessageContentSequencer) UnmarshalMsg

func (z *MessageContentSequencer) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MessageContentTx

type MessageContentTx struct {
	Hash         []byte
	ParentsHash  [][]byte
	MineNonce    uint64
	AccountNonce uint64
	From         []byte
	To           []byte
	Value        string // bigint
	TokenId      int32
	PublicKey    []byte
	Data         []byte
	Signature    []byte
}

msgp MessageContentTx

func (*MessageContentTx) DecodeMsg

func (z *MessageContentTx) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MessageContentTx) EncodeMsg

func (z *MessageContentTx) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MessageContentTx) FromBytes

func (z *MessageContentTx) FromBytes(bts []byte) error

func (*MessageContentTx) MarshalMsg

func (z *MessageContentTx) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MessageContentTx) Msgsize

func (z *MessageContentTx) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MessageContentTx) ToBytes

func (z *MessageContentTx) ToBytes() []byte

func (*MessageContentTx) UnmarshalMsg

func (z *MessageContentTx) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncBlockByHashRequest

type OgSyncBlockByHashRequest struct {
	Hash   []byte
	Offset int
}

msgp OgSyncBlockByHashRequest

func (*OgSyncBlockByHashRequest) DecodeMsg

func (z *OgSyncBlockByHashRequest) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*OgSyncBlockByHashRequest) EncodeMsg

func (z *OgSyncBlockByHashRequest) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*OgSyncBlockByHashRequest) MarshalMsg

func (z *OgSyncBlockByHashRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*OgSyncBlockByHashRequest) Msgsize

func (z *OgSyncBlockByHashRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncBlockByHashRequest) UnmarshalMsg

func (z *OgSyncBlockByHashRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncBlockByHashResponse

type OgSyncBlockByHashResponse struct {
	HasMore    bool
	Sequencers MessageContentSequencer
	Ints       MessageContentInt
	Txs        []MessageContentTx
}

msgp OgSyncBlockByHashResponse

func (*OgSyncBlockByHashResponse) DecodeMsg

func (z *OgSyncBlockByHashResponse) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*OgSyncBlockByHashResponse) EncodeMsg

func (z *OgSyncBlockByHashResponse) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*OgSyncBlockByHashResponse) MarshalMsg

func (z *OgSyncBlockByHashResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*OgSyncBlockByHashResponse) Msgsize

func (z *OgSyncBlockByHashResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncBlockByHashResponse) UnmarshalMsg

func (z *OgSyncBlockByHashResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncBlockByHeightRequest

type OgSyncBlockByHeightRequest struct {
	Height int64
	Offset int
}

msgp OgSyncBlockByHeightRequest

func (*OgSyncBlockByHeightRequest) DecodeMsg

func (z *OgSyncBlockByHeightRequest) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (OgSyncBlockByHeightRequest) EncodeMsg

func (z OgSyncBlockByHeightRequest) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (OgSyncBlockByHeightRequest) MarshalMsg

func (z OgSyncBlockByHeightRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (OgSyncBlockByHeightRequest) Msgsize

func (z OgSyncBlockByHeightRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncBlockByHeightRequest) UnmarshalMsg

func (z *OgSyncBlockByHeightRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncBlockByHeightResponse

type OgSyncBlockByHeightResponse struct {
	HasMore    bool
	Sequencers MessageContentSequencer
	Ints       MessageContentInt
	Txs        []MessageContentTx
}

msgp OgSyncBlockByHeightResponse

func (*OgSyncBlockByHeightResponse) DecodeMsg

func (z *OgSyncBlockByHeightResponse) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*OgSyncBlockByHeightResponse) EncodeMsg

func (z *OgSyncBlockByHeightResponse) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*OgSyncBlockByHeightResponse) MarshalMsg

func (z *OgSyncBlockByHeightResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*OgSyncBlockByHeightResponse) Msgsize

func (z *OgSyncBlockByHeightResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncBlockByHeightResponse) UnmarshalMsg

func (z *OgSyncBlockByHeightResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncByHashesRequest

type OgSyncByHashesRequest struct {
	Hashes [][]byte
}

msgp OgSyncByHashesRequest

func (*OgSyncByHashesRequest) DecodeMsg

func (z *OgSyncByHashesRequest) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*OgSyncByHashesRequest) EncodeMsg

func (z *OgSyncByHashesRequest) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*OgSyncByHashesRequest) MarshalMsg

func (z *OgSyncByHashesRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*OgSyncByHashesRequest) Msgsize

func (z *OgSyncByHashesRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncByHashesRequest) UnmarshalMsg

func (z *OgSyncByHashesRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncByHashesResponse

type OgSyncByHashesResponse struct {
	Sequencers []MessageContentSequencer
	Txs        []MessageContentTx
	Ints       []MessageContentInt
}

msgp OgSyncByHashesResponse

func (*OgSyncByHashesResponse) DecodeMsg

func (z *OgSyncByHashesResponse) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*OgSyncByHashesResponse) EncodeMsg

func (z *OgSyncByHashesResponse) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*OgSyncByHashesResponse) MarshalMsg

func (z *OgSyncByHashesResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*OgSyncByHashesResponse) Msgsize

func (z *OgSyncByHashesResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncByHashesResponse) UnmarshalMsg

func (z *OgSyncByHashesResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncLatestHeightRequest

type OgSyncLatestHeightRequest struct {
	MyHeight int64
}

msgp OgSyncLatestHeightRequest

func (*OgSyncLatestHeightRequest) DecodeMsg

func (z *OgSyncLatestHeightRequest) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (OgSyncLatestHeightRequest) EncodeMsg

func (z OgSyncLatestHeightRequest) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (OgSyncLatestHeightRequest) MarshalMsg

func (z OgSyncLatestHeightRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (OgSyncLatestHeightRequest) Msgsize

func (z OgSyncLatestHeightRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncLatestHeightRequest) UnmarshalMsg

func (z *OgSyncLatestHeightRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncLatestHeightResponse

type OgSyncLatestHeightResponse struct {
	MyHeight int64
}

msgp OgSyncLatestHeightResponse

func (*OgSyncLatestHeightResponse) DecodeMsg

func (z *OgSyncLatestHeightResponse) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (OgSyncLatestHeightResponse) EncodeMsg

func (z OgSyncLatestHeightResponse) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (OgSyncLatestHeightResponse) MarshalMsg

func (z OgSyncLatestHeightResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (OgSyncLatestHeightResponse) Msgsize

func (z OgSyncLatestHeightResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncLatestHeightResponse) UnmarshalMsg

func (z *OgSyncLatestHeightResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OgSyncType

type OgSyncType int
const (
	OgSyncTypeLatestHeight OgSyncType = iota
	OgSyncTypeByHashes
	OgSyncTypeBlockByHeight
	OgSyncTypeBlockByHash
)

func (*OgSyncType) DecodeMsg

func (z *OgSyncType) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (OgSyncType) EncodeMsg

func (z OgSyncType) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (OgSyncType) MarshalMsg

func (z OgSyncType) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (OgSyncType) Msgsize

func (z OgSyncType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*OgSyncType) UnmarshalMsg

func (z *OgSyncType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Resource

type Resource interface {
	GetType() int
	ToBytes() []byte
	FromBytes([]byte) error
}

type ResourceFetcher

type ResourceFetcher interface {
	Fetch(request ResourceRequest) []Resource
}

type ResourceRequest

type ResourceRequest interface {
	GetType() int
	ToBytes() []byte
	FromBytes([]byte) error
}

type ResourceType

type ResourceType uint8
const (
	ResourceTypeTx ResourceType = iota
	ResourceTypeSequencer
	ResourceTypeArchive
	ResourceTypeAction
	ResourceTypeInt
)

func (*ResourceType) DecodeMsg

func (z *ResourceType) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ResourceType) EncodeMsg

func (z ResourceType) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ResourceType) MarshalMsg

func (z ResourceType) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ResourceType) Msgsize

func (z ResourceType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ResourceType) UnmarshalMsg

func (z *ResourceType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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