bootstrap

package module
v0.0.0-...-67070f9 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

README

bootstrap_go

Lightweight bootstrap nodes for Golem network. Basic implementation in Go.

CircleCI

installation

prerequisites

get code and deps

This will get the sources into GOPATH which is by default ~/go.

go get github.com/golemfactory/bootstrap_go
cd ~/go/src/github.com/golemfactory/bootstrap_go/
# get dependencies and test dependencies
go get -t ./...

run

go run main/main.go

tests

go test ./...

benchmarks

go test -bench=. -benchtime=20s ./...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetShortHashSha

func GetShortHashSha(data []byte) []byte

Types

type Config

type Config struct {
	Name                 string
	Id                   string
	Port                 uint64
	PrvAddr              string
	PubAddr              string
	PrvAddresses         []interface{}
	NatType              []interface{}
	PeerNum              int
	ProtocolId           string
	GolemMessagesVersion string
	GolemVersion         string
}

type PeerSession

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

func NewPeerSession

func NewPeerSession(service *Service, conn net.Conn) *PeerSession

func (*PeerSession) Close

func (session *PeerSession) Close()

type Service

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

func NewService

func NewService(config *Config, privKey crypto.PrivateKey, pk peerkeeper.PeerKeeper) *Service

func (*Service) Listen

func (s *Service) Listen() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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