Documentation
¶
Index ¶
- Constants
- type Bitmap
- type KeyToOffsetAndSizeAndBlocktime
- type KeyToOffsetAndSizeAndBlocktimeSlice
- type LinkedLog
- func (s *LinkedLog) Close() error
- func (s *LinkedLog) Flush() error
- func (s *LinkedLog) Put(callbackBefore func(pk solana.PublicKey) (indexes.OffsetAndSize, error), ...) (uint64, error)
- func (s *LinkedLog) Read(offset uint64) ([]OffsetAndSizeAndSlot, indexes.OffsetAndSize, error)
- func (s *LinkedLog) ReadWithSize(offset uint64, size uint64) ([]OffsetAndSizeAndSlot, indexes.OffsetAndSize, error)
- type OffsetAndSizeAndSlot
- func (oas OffsetAndSizeAndSlot) Bytes() []byte
- func (oas *OffsetAndSizeAndSlot) FromBytes(buf []byte) error
- func (oas *OffsetAndSizeAndSlot) FromReader(r UvarintReader) error
- func (oas *OffsetAndSizeAndSlot) HasMeta() bool
- func (oas *OffsetAndSizeAndSlot) IsSuccess() bool
- func (oas *OffsetAndSizeAndSlot) IsVote() bool
- func (oas *OffsetAndSizeAndSlot) SetHasMeta(hasMeta bool)
- func (oas *OffsetAndSizeAndSlot) SetIsSuccess(isSuccess bool)
- func (oas *OffsetAndSizeAndSlot) SetIsVote(isVote bool)
- type UvarintReader
Constants ¶
View Source
const ( KiB = 1024 MiB = 1024 * KiB GiB = 1024 * MiB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitmap ¶ added in v0.6.0
type Bitmap byte
func NewBitmapFromValues ¶ added in v0.6.0
type KeyToOffsetAndSizeAndBlocktime ¶ added in v0.4.0
type KeyToOffsetAndSizeAndBlocktime struct { Key solana.PublicKey Values []*OffsetAndSizeAndSlot }
type KeyToOffsetAndSizeAndBlocktimeSlice ¶ added in v0.4.0
type KeyToOffsetAndSizeAndBlocktimeSlice []KeyToOffsetAndSizeAndBlocktime
func (KeyToOffsetAndSizeAndBlocktimeSlice) Has ¶ added in v0.4.0
func (s KeyToOffsetAndSizeAndBlocktimeSlice) Has(key solana.PublicKey) bool
Has returns true if the given public key is in the slice.
type LinkedLog ¶
type LinkedLog struct {
// contains filtered or unexported fields
}
func NewLinkedLog ¶
func (*LinkedLog) Put ¶
func (s *LinkedLog) Put( callbackBefore func(pk solana.PublicKey) (indexes.OffsetAndSize, error), callbackAfter func(pk solana.PublicKey, offset uint64, ln uint32) error, values ...KeyToOffsetAndSizeAndBlocktime, ) (uint64, error)
func (*LinkedLog) Read ¶
func (s *LinkedLog) Read(offset uint64) ([]OffsetAndSizeAndSlot, indexes.OffsetAndSize, error)
Read reads the block stored at the given offset.
func (*LinkedLog) ReadWithSize ¶ added in v0.4.0
func (s *LinkedLog) ReadWithSize(offset uint64, size uint64) ([]OffsetAndSizeAndSlot, indexes.OffsetAndSize, error)
type OffsetAndSizeAndSlot ¶ added in v0.6.0
type OffsetAndSizeAndSlot struct { Offset uint64 // encoded as uvarint Size uint64 // encoded as uvarint Slot uint64 // encoded as uvarint Flags Bitmap // encoded as byte }
func NewOffsetAndSizeAndSlot ¶ added in v0.6.0
func NewOffsetAndSizeAndSlot(offset uint64, size uint64, slot uint64) *OffsetAndSizeAndSlot
func OffsetAndSizeAndSlotSliceFromBytes ¶ added in v0.6.0
func OffsetAndSizeAndSlotSliceFromBytes(buf []byte) ([]OffsetAndSizeAndSlot, error)
func (OffsetAndSizeAndSlot) Bytes ¶ added in v0.6.0
func (oas OffsetAndSizeAndSlot) Bytes() []byte
Bytes returns the offset and size as a byte slice.
func (*OffsetAndSizeAndSlot) FromBytes ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) FromBytes(buf []byte) error
FromBytes parses the offset and size from a byte slice.
func (*OffsetAndSizeAndSlot) FromReader ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) FromReader(r UvarintReader) error
func (*OffsetAndSizeAndSlot) HasMeta ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) HasMeta() bool
HasMeta returns true if the transaction had metadata.
func (*OffsetAndSizeAndSlot) IsSuccess ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) IsSuccess() bool
IsSuccess returns the isSuccess flag.
func (*OffsetAndSizeAndSlot) IsVote ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) IsVote() bool
IsVote returns the isVote flag.
func (*OffsetAndSizeAndSlot) SetHasMeta ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) SetHasMeta(hasMeta bool)
SetHasMeta sets the hasMeta flag.
func (*OffsetAndSizeAndSlot) SetIsSuccess ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) SetIsSuccess(isSuccess bool)
SetIsSuccess sets the isSuccess flag.
func (*OffsetAndSizeAndSlot) SetIsVote ¶ added in v0.6.0
func (oas *OffsetAndSizeAndSlot) SetIsVote(isVote bool)
SetIsVote sets the isVote flag.
Click to show internal directories.
Click to hide internal directories.