sender

package
v0.0.0-...-4ff85e9 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(
	opts *SenderOpts,
	storageService *services.StorageService,
	dhtService *services.DHTService,
) *Client

func (*Client) AnnounceNewNode

func (c *Client) AnnounceNewNode(node *dht.Node) error

func (*Client) LoadNodesFromSync

func (c *Client) LoadNodesFromSync(syncNode *dht.Node) error

func (*Client) Serve

func (c *Client) Serve(notifyReady chan<- bool) error

type SenderOpts

type SenderOpts struct {
	Port              int
	SyncNode          string
	AnnounceNew       bool
	CheckInterval     time.Duration
	ReplicationFactor int

	Logger *slog.Logger

	NotifyRebase    <-chan bool
	ReplicationChan <-chan *cas.KeyHashPair
}

Jump to

Keyboard shortcuts

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