distributed

package
v0.0.0-...-d047852 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NEED_BROADCAST_TOPIC                = "need-broadcast-topic"
	IMAGE_TRANSFER_PROTOCOL protocol.ID = "/permit-image-transfer/0.0.1"
)

Variables

View Source
var IsUp = false

Functions

func NeedById

func NeedById(id string) ([]byte, error)

Types

type ContentNode

type ContentNode struct {
	Topics map[string]*pubsub.Topic
	// contains filtered or unexported fields
}
var Node *ContentNode

func Connect

func Connect(conf *config.AppConfig) *ContentNode

func NewNode

func NewNode(ctx context.Context, addr []string, bootstrap string) *ContentNode

func (*ContentNode) ID

func (node *ContentNode) ID() string

func (*ContentNode) Join

func (node *ContentNode) Join(s string) (*pubsub.Topic, error)

func (*ContentNode) PeerID

func (node *ContentNode) PeerID() peer.ID

Jump to

Keyboard shortcuts

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