types

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMessageFormat

func RegisterMessageFormat(c serde.Format, f serde.FormatEngine)

RegisterMessageFormat register the engine for the provided format.

Types

type AddrKey

type AddrKey struct{}

AddrKey is the key for the address factory.

type EndShuffle

type EndShuffle struct {
}

EndShuffle is the message the node running during the last round should send to all the nodes.

- implements serde.Message

func NewEndShuffle

func NewEndShuffle() EndShuffle

NewEndShuffle creates a new EndShuffle message.

func (EndShuffle) Serialize

func (e EndShuffle) Serialize(ctx serde.Context) ([]byte, error)

Serialize implements serde.Message. It looks up the format and returns the serialized data for the start message.

type MessageFactory

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

MessageFactory is a message factory for the different SHUFFLE messages.

- implements serde.Factory

func NewMessageFactory

func NewMessageFactory(f mino.AddressFactory) MessageFactory

NewMessageFactory returns a message factory for the shuffle protocol.

func (MessageFactory) Deserialize

func (f MessageFactory) Deserialize(ctx serde.Context, data []byte) (serde.Message, error)

Deserialize implements serde.Factory.

type StartShuffle

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

StartShuffle is the message the initiator of the SHUFFLE protocol should send to all the nodes.

- implements serde.Message

func NewStartShuffle

func NewStartShuffle(formId string, addresses []mino.Address) StartShuffle

NewStartShuffle creates a new StartShuffle message.

func (StartShuffle) GetAddresses

func (s StartShuffle) GetAddresses() []mino.Address

GetAddresses returns the list of addresses.

func (StartShuffle) GetFormId

func (s StartShuffle) GetFormId() string

GetFormId returns the formId.

func (StartShuffle) Serialize

func (s StartShuffle) Serialize(ctx serde.Context) ([]byte, error)

Serialize implements serde.Message. It looks up the format and returns the serialized data for the start message.

Jump to

Keyboard shortcuts

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