notify

package
v0.0.0-...-2de43c5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 3 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 string
const (
	MessageChunkWritten Message = "chunkWritten"
	MessageStageUpdated Message = "stageUpdated"
	MessageAppearance   Message = "appearance"
)

type Notification

type Notification[T NotificationPayload] struct {
	Msg     Message         `json:"msg"`
	Meta    *types.MetaData `json:"meta"`
	Payload T               `json:"payload"`
}

func NewChunkWrittenNotification

func NewChunkWrittenNotification(meta *types.MetaData, chunk string) *Notification[string]

func NewStageUpdatedNotification

func NewStageUpdatedNotification(meta *types.MetaData, chunkRange string) *Notification[string]

type NotificationPayloadAppearance

type NotificationPayloadAppearance struct {
	Address string `json:"address"`
	// We use string for block number to ensure it's never
	// too big
	BlockNumber      string `json:"blockNumber"`
	TransactionIndex uint32 `json:"txid"`
}

func (*NotificationPayloadAppearance) FromString

func (n *NotificationPayloadAppearance) FromString(s string) (err error)

type NotificationPayloadChunkWritten

type NotificationPayloadChunkWritten struct {
	Cid    string `json:"cid"`
	Range  string `json:"range"`
	Author string `json:"author"`
}

Jump to

Keyboard shortcuts

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