discovery

package
v0.0.0-...-be0919c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Discovery structure holds discovery service state

func NewFakeDiscovery

func NewFakeDiscovery() *Discovery

NewFakeDiscovery creates fake discovery structure

func NewService

func NewService(
	identityRegistry identity_registry.IdentityRegistry,
	identityRegistration identity_registry.RegistrationDataProvider,
	mysteriumClient server.Client,
	signerCreate identity.SignerFactory,
) *Discovery

NewService creates new discovery service

func (*Discovery) Start

func (d *Discovery) Start(ownIdentity identity.Identity, proposal dto_discovery.ServiceProposal)

Start launches discovery service

func (*Discovery) Stop

func (d *Discovery) Stop()

Stop stops discovery loop

func (*Discovery) Wait

func (d *Discovery) Wait()

Wait wait for proposal announcements to stop / unregister

type Status

type Status int

Status describes stage of proposal registration

const (
	IdentityUnregistered Status = iota
	WaitingForRegistration
	IdentityRegisterFailed
	RegisterProposal
	PingProposal
	UnregisterProposal
	UnregisterProposalFailed
	ProposalUnregistered
	StatusUndefined
)

Proposal registration stages

Jump to

Keyboard shortcuts

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