stdevents

package
v0.0.0-...-9727c61 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RawEvent             = "Raw"
	InitEvent            = "Init"
	SendMessageEvent     = "SendMessage"
	MessageReceivedEvent = "MessageReceived"
	TimerDelayEvent      = "TimerDelay"
	TimerRepeatEvent     = "TimerRepeat"
	NewSubmoduleEvent    = "NewSubmodule"
	GarbageCollectEvent  = "GarbageCollect"
	TestStringEvent      = "TestString"
	TestUint64Event      = "TestUint"
)

Variables

This section is empty.

Functions

func Deserialize

func Deserialize(data []byte) (stdtypes.Event, error)

Types

type GarbageCollect

type GarbageCollect struct {
	RetentionIndex stdtypes.RetentionIndex
	// contains filtered or unexported fields
}

func NewGarbageCollect

func NewGarbageCollect(dest stdtypes.ModuleID, retIdx stdtypes.RetentionIndex) *GarbageCollect

func NewGarbageCollectWithSrc

func NewGarbageCollectWithSrc(
	src stdtypes.ModuleID,
	dest stdtypes.ModuleID,
	retIdx stdtypes.RetentionIndex,
) *GarbageCollect

func (*GarbageCollect) Dest

func (e *GarbageCollect) Dest() t.ModuleID

func (*GarbageCollect) NewDest

func (e *GarbageCollect) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*GarbageCollect) NewSrc

func (e *GarbageCollect) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*GarbageCollect) Src

func (e *GarbageCollect) Src() t.ModuleID

func (*GarbageCollect) ToBytes

func (e *GarbageCollect) ToBytes() ([]byte, error)

func (*GarbageCollect) ToString

func (e *GarbageCollect) ToString() string

type Init

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

func NewInit

func NewInit(dest stdtypes.ModuleID) *Init

func NewInitWithSrc

func NewInitWithSrc(src stdtypes.ModuleID, dest stdtypes.ModuleID) *Init

func (*Init) Dest

func (e *Init) Dest() t.ModuleID

func (*Init) NewDest

func (e *Init) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*Init) NewSrc

func (e *Init) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*Init) Src

func (e *Init) Src() t.ModuleID

func (*Init) ToBytes

func (e *Init) ToBytes() ([]byte, error)

func (*Init) ToString

func (e *Init) ToString() string

type MessageReceived

type MessageReceived struct {
	Sender  stdtypes.NodeID
	Payload stdtypes.Message
	// contains filtered or unexported fields
}

func NewMessageReceived

func NewMessageReceived(dest stdtypes.ModuleID, sender stdtypes.NodeID, payload stdtypes.Message) *MessageReceived

func NewMessageReceivedWithSrc

func NewMessageReceivedWithSrc(src stdtypes.ModuleID, dest stdtypes.ModuleID, sender stdtypes.NodeID, payload stdtypes.Message) *MessageReceived

func (*MessageReceived) Dest

func (e *MessageReceived) Dest() t.ModuleID

func (*MessageReceived) NewDest

func (e *MessageReceived) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*MessageReceived) NewSrc

func (e *MessageReceived) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*MessageReceived) Src

func (e *MessageReceived) Src() t.ModuleID

func (*MessageReceived) ToBytes

func (e *MessageReceived) ToBytes() ([]byte, error)

func (*MessageReceived) ToString

func (e *MessageReceived) ToString() string

type NewSubmodule

type NewSubmodule struct {
	SubmoduleID    stdtypes.ModuleID
	Params         stdtypes.Serializable
	RetentionIndex stdtypes.RetentionIndex
	// contains filtered or unexported fields
}

func NewNewSubmodule

func NewNewSubmodule(
	dest stdtypes.ModuleID,
	submoduleID stdtypes.ModuleID,
	params stdtypes.Serializable,
	retIdx stdtypes.RetentionIndex,
) *NewSubmodule

func NewNewSubmoduleWithSrc

func NewNewSubmoduleWithSrc(
	src stdtypes.ModuleID,
	dest stdtypes.ModuleID,
	submoduleID stdtypes.ModuleID,
	params stdtypes.Serializable,
	retIdx stdtypes.RetentionIndex,
) *NewSubmodule

func (*NewSubmodule) Dest

func (e *NewSubmodule) Dest() t.ModuleID

func (*NewSubmodule) NewDest

func (e *NewSubmodule) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*NewSubmodule) NewSrc

func (e *NewSubmodule) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*NewSubmodule) Src

func (e *NewSubmodule) Src() t.ModuleID

func (*NewSubmodule) ToBytes

func (e *NewSubmodule) ToBytes() ([]byte, error)

func (*NewSubmodule) ToString

func (e *NewSubmodule) ToString() string

type Raw

type Raw struct {
	Data []byte
	// contains filtered or unexported fields
}

func NewRaw

func NewRaw(dest stdtypes.ModuleID, data []byte) *Raw

func NewRawWithSrc

func NewRawWithSrc(src stdtypes.ModuleID, dest stdtypes.ModuleID, data []byte) *Raw

func WrapInRaw

func WrapInRaw(e stdtypes.Event) (*Raw, error)

func (*Raw) Dest

func (e *Raw) Dest() t.ModuleID

func (*Raw) NewDest

func (e *Raw) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*Raw) NewSrc

func (e *Raw) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*Raw) Src

func (e *Raw) Src() t.ModuleID

func (*Raw) ToBytes

func (e *Raw) ToBytes() ([]byte, error)

func (*Raw) ToString

func (e *Raw) ToString() string

type SendMessage

type SendMessage struct {
	DestNodes        []stdtypes.NodeID
	RemoteDestModule stdtypes.ModuleID
	Payload          stdtypes.Message
	// contains filtered or unexported fields
}

func NewSendMessage

func NewSendMessage(
	localDestModule stdtypes.ModuleID,
	remoteDestModule stdtypes.ModuleID,
	message stdtypes.Message,
	destNodes ...stdtypes.NodeID,
) *SendMessage

func NewSendMessageWithSrc

func NewSendMessageWithSrc(
	srcModule stdtypes.ModuleID,
	localDestModule stdtypes.ModuleID,
	remoteDestModule stdtypes.ModuleID,
	message stdtypes.Message,
	destNodes ...stdtypes.NodeID,
) *SendMessage

func (*SendMessage) Dest

func (e *SendMessage) Dest() t.ModuleID

func (*SendMessage) NewDest

func (e *SendMessage) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*SendMessage) NewSrc

func (e *SendMessage) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*SendMessage) Src

func (e *SendMessage) Src() t.ModuleID

func (*SendMessage) ToBytes

func (e *SendMessage) ToBytes() ([]byte, error)

func (*SendMessage) ToString

func (e *SendMessage) ToString() string

type TestString

type TestString struct {
	Value string
	// contains filtered or unexported fields
}

func NewTestString

func NewTestString(dest stdtypes.ModuleID, value string) *TestString

func NewTestStringWithSrc

func NewTestStringWithSrc(src stdtypes.ModuleID, dest stdtypes.ModuleID, value string) *TestString

func (*TestString) Dest

func (e *TestString) Dest() t.ModuleID

func (*TestString) NewDest

func (e *TestString) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*TestString) NewSrc

func (e *TestString) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*TestString) Src

func (e *TestString) Src() t.ModuleID

func (*TestString) ToBytes

func (e *TestString) ToBytes() ([]byte, error)

func (*TestString) ToString

func (e *TestString) ToString() string

type TestUint64

type TestUint64 struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTestUint64

func NewTestUint64(dest stdtypes.ModuleID, value uint64) *TestUint64

func NewTestUint64WithSrc

func NewTestUint64WithSrc(src stdtypes.ModuleID, dest stdtypes.ModuleID, value uint64) *TestUint64

func (*TestUint64) Dest

func (e *TestUint64) Dest() t.ModuleID

func (*TestUint64) NewDest

func (e *TestUint64) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*TestUint64) NewSrc

func (e *TestUint64) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*TestUint64) Src

func (e *TestUint64) Src() t.ModuleID

func (*TestUint64) ToBytes

func (e *TestUint64) ToBytes() ([]byte, error)

func (*TestUint64) ToString

func (e *TestUint64) ToString() string

type TimerDelay

type TimerDelay struct {
	Events []stdtypes.Event
	Delay  time.Duration
	// contains filtered or unexported fields
}

func NewTimerDelay

func NewTimerDelay(dest stdtypes.ModuleID, delay time.Duration, events ...stdtypes.Event) *TimerDelay

func NewTimerDelayWithSrc

func NewTimerDelayWithSrc(src stdtypes.ModuleID, dest stdtypes.ModuleID, delay time.Duration, events ...stdtypes.Event) *TimerDelay

func (*TimerDelay) Dest

func (e *TimerDelay) Dest() t.ModuleID

func (*TimerDelay) NewDest

func (e *TimerDelay) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*TimerDelay) NewSrc

func (e *TimerDelay) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*TimerDelay) Src

func (e *TimerDelay) Src() t.ModuleID

func (*TimerDelay) ToBytes

func (e *TimerDelay) ToBytes() ([]byte, error)

func (*TimerDelay) ToString

func (e *TimerDelay) ToString() string

type TimerRepeat

type TimerRepeat struct {
	Events         []stdtypes.Event
	Period         time.Duration
	RetentionIndex stdtypes.RetentionIndex
	// contains filtered or unexported fields
}

func NewTimerRepeat

func NewTimerRepeat(
	dest stdtypes.ModuleID,
	period time.Duration,
	retentionIndex stdtypes.RetentionIndex,
	events ...stdtypes.Event,
) *TimerRepeat

func NewTimerRepeatWithSrc

func NewTimerRepeatWithSrc(
	src stdtypes.ModuleID,
	dest stdtypes.ModuleID,
	period time.Duration,
	retentionIndex stdtypes.RetentionIndex,
	events ...stdtypes.Event,
) *TimerRepeat

func (*TimerRepeat) Dest

func (e *TimerRepeat) Dest() t.ModuleID

func (*TimerRepeat) NewDest

func (e *TimerRepeat) NewDest(newDest stdtypes.ModuleID) stdtypes.Event

func (*TimerRepeat) NewSrc

func (e *TimerRepeat) NewSrc(newSrc stdtypes.ModuleID) stdtypes.Event

func (*TimerRepeat) Src

func (e *TimerRepeat) Src() t.ModuleID

func (*TimerRepeat) ToBytes

func (e *TimerRepeat) ToBytes() ([]byte, error)

func (*TimerRepeat) ToString

func (e *TimerRepeat) ToString() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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