notify

package
v0.0.0-...-3f8eaf4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 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    *rpc.MetaData `json:"meta"`
	Payload T             `json:"payload"`
}

func NewChunkWrittenNotification

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

func NewStageUpdatedNotification

func NewStageUpdatedNotification(meta *rpc.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