shared

package
v1.73.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnounceEvent

type AnnounceEvent int32
const (
	None      AnnounceEvent = iota
	Completed               // The local peer just completed the torrent.
	Started                 // The local peer has just resumed this torrent.
	Stopped                 // The local peer is leaving the swarm.
)

func (AnnounceEvent) LogValue

func (me AnnounceEvent) LogValue() slog.Value

func (AnnounceEvent) MarshalJSON

func (me AnnounceEvent) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler to ensure AnnounceEvent is serialized as a string in JSON

func (AnnounceEvent) MarshalText

func (me AnnounceEvent) MarshalText() ([]byte, error)

func (AnnounceEvent) String

func (e AnnounceEvent) String() string

func (*AnnounceEvent) UnmarshalJSON

func (me *AnnounceEvent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler to deserialize AnnounceEvent from a string in JSON

func (*AnnounceEvent) UnmarshalText

func (me *AnnounceEvent) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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