s4

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const S4ReportingPluginName = "S4Reporting"

Variables

View Source
var File_messages_proto protoreflect.FileDescriptor

Functions

func MarshalQuery

func MarshalQuery(rows []*SnapshotRow, addressRange *s4.AddressRange) ([]byte, error)

func MarshalRows

func MarshalRows(rows []*Row) ([]byte, error)

func NewReportingPlugin

func NewReportingPlugin(logger commontypes.Logger, config *PluginConfig, orm s4.ORM) (types.ReportingPlugin, error)

func UnmarshalAddress

func UnmarshalAddress(address []byte) *ubig.Big

Types

type AddressRange

type AddressRange struct {
	MinAddress []byte `protobuf:"bytes,1,opt,name=minAddress,proto3" json:"minAddress,omitempty"`
	MaxAddress []byte `protobuf:"bytes,2,opt,name=maxAddress,proto3" json:"maxAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*AddressRange) Descriptor deprecated

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

Deprecated: Use AddressRange.ProtoReflect.Descriptor instead.

func (*AddressRange) GetMaxAddress

func (x *AddressRange) GetMaxAddress() []byte

func (*AddressRange) GetMinAddress

func (x *AddressRange) GetMinAddress() []byte

func (*AddressRange) ProtoMessage

func (*AddressRange) ProtoMessage()

func (*AddressRange) ProtoReflect

func (x *AddressRange) ProtoReflect() protoreflect.Message

func (*AddressRange) Reset

func (x *AddressRange) Reset()

func (*AddressRange) String

func (x *AddressRange) String() string

type PluginConfig

type PluginConfig struct {
	ProductName             string
	NSnapshotShards         uint
	MaxObservationEntries   uint
	MaxReportEntries        uint
	MaxDeleteExpiredEntries uint
}

type PluginConfigDecoder

type PluginConfigDecoder func([]byte) (*PluginConfig, *types.ReportingPluginLimits, error)

type Query

type Query struct {
	AddressRange *AddressRange  `protobuf:"bytes,1,opt,name=addressRange,proto3" json:"addressRange,omitempty"`
	Rows         []*SnapshotRow `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"`
	// contains filtered or unexported fields
}

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetAddressRange

func (x *Query) GetAddressRange() *AddressRange

func (*Query) GetRows

func (x *Query) GetRows() []*SnapshotRow

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

func (x *Query) ProtoReflect() protoreflect.Message

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type Row

type Row struct {
	Address    []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Slotid     uint32 `protobuf:"varint,2,opt,name=slotid,proto3" json:"slotid,omitempty"`
	Payload    []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Version    uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
	Expiration int64  `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"`
	Signature  []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func UnmarshalRows

func UnmarshalRows(data []byte) ([]*Row, error)

func (*Row) Descriptor deprecated

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

Deprecated: Use Row.ProtoReflect.Descriptor instead.

func (*Row) GetAddress

func (x *Row) GetAddress() []byte

func (*Row) GetExpiration

func (x *Row) GetExpiration() int64

func (*Row) GetPayload

func (x *Row) GetPayload() []byte

func (*Row) GetSignature

func (x *Row) GetSignature() []byte

func (*Row) GetSlotid

func (x *Row) GetSlotid() uint32

func (*Row) GetVersion

func (x *Row) GetVersion() uint64

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) ProtoReflect

func (x *Row) ProtoReflect() protoreflect.Message

func (*Row) Reset

func (x *Row) Reset()

func (*Row) String

func (x *Row) String() string

func (*Row) VerifySignature

func (row *Row) VerifySignature() error

type Rows

type Rows struct {
	Rows []*Row `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
	// contains filtered or unexported fields
}

func (*Rows) Descriptor deprecated

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

Deprecated: Use Rows.ProtoReflect.Descriptor instead.

func (*Rows) GetRows

func (x *Rows) GetRows() []*Row

func (*Rows) ProtoMessage

func (*Rows) ProtoMessage()

func (*Rows) ProtoReflect

func (x *Rows) ProtoReflect() protoreflect.Message

func (*Rows) Reset

func (x *Rows) Reset()

func (*Rows) String

func (x *Rows) String() string

type S4ReportingPluginFactory

type S4ReportingPluginFactory struct {
	Logger        commontypes.Logger
	ORM           s4_orm.ORM
	ConfigDecoder PluginConfigDecoder
}

func (S4ReportingPluginFactory) NewReportingPlugin

NewReportingPlugin complies with ReportingPluginFactory

type SnapshotRow

type SnapshotRow struct {
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Slotid  uint32 `protobuf:"varint,2,opt,name=slotid,proto3" json:"slotid,omitempty"`
	Version uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func UnmarshalQuery

func UnmarshalQuery(data []byte) ([]*SnapshotRow, *s4.AddressRange, error)

func (*SnapshotRow) Descriptor deprecated

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

Deprecated: Use SnapshotRow.ProtoReflect.Descriptor instead.

func (*SnapshotRow) GetAddress

func (x *SnapshotRow) GetAddress() []byte

func (*SnapshotRow) GetSlotid

func (x *SnapshotRow) GetSlotid() uint32

func (*SnapshotRow) GetVersion

func (x *SnapshotRow) GetVersion() uint64

func (*SnapshotRow) ProtoMessage

func (*SnapshotRow) ProtoMessage()

func (*SnapshotRow) ProtoReflect

func (x *SnapshotRow) ProtoReflect() protoreflect.Message

func (*SnapshotRow) Reset

func (x *SnapshotRow) Reset()

func (*SnapshotRow) String

func (x *SnapshotRow) String() string

Jump to

Keyboard shortcuts

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