storage

package
v0.0.0-...-ee95d54 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID            string `json:"id"`
	DkgRoundID    string `json:"dkg_round_id"`
	Offset        uint64 `json:"offset"`
	Event         string `json:"event"`
	Data          []byte `json:"data"`
	Signature     []byte `json:"signature"`
	SenderAddr    string `json:"sender"`
	RecipientAddr string `json:"recipient"`
}

func (*Message) Bytes

func (m *Message) Bytes() []byte

func (*Message) Verify

func (m *Message) Verify(pubKey ed25519.PublicKey) bool

type Storage

type Storage interface {
	// Send is expected to be an atomic operation.
	Send(messages ...Message) error
	GetMessages(offset uint64) ([]Message, error)
	Close() error
	IgnoreMessages(messages []string, useOffset bool) error
	UnignoreMessages()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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