broadcaster

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost = "0.0.0.0"
	DefaultPort = "80"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

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

func NewBroadcaster

func NewBroadcaster(_ context.Context, config *config.File) (*Broadcaster, error)

func (*Broadcaster) GetNodeInfo added in v0.1.7

func (b *Broadcaster) GetNodeInfo(c echo.Context) error

func (*Broadcaster) Heartbeat

func (b *Broadcaster) Heartbeat(ctx context.Context) error

func (*Broadcaster) Register

func (b *Broadcaster) Register(ctx context.Context) error

func (*Broadcaster) Run

func (b *Broadcaster) Run(ctx context.Context) error

type NodeHeartbeatRequest

type NodeHeartbeatRequest struct {
	Address   common.Address `json:"address" validate:"required"`
	Signature string         `json:"signature" validate:"required"`
	Endpoint  string         `json:"endpoint" validate:"required"`
	Timestamp int64          `json:"timestamp" validate:"required"`
}

type RegisterNodeRequest

type RegisterNodeRequest struct {
	Address   common.Address `json:"address" validate:"required"`
	Signature string         `json:"signature" validate:"required"`
	Endpoint  string         `json:"endpoint" validate:"required"`
	Stream    *config.Stream `json:"stream,omitempty"`
	Config    *config.Node   `json:"config,omitempty"`
}

Jump to

Keyboard shortcuts

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