service

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorLocation error indicates that action (i.e. disconnect)
	ErrorLocation = errors.New("failed to detect service location")
)

Functions

This section is empty.

Types

type DialogHandlerFactory

DialogHandlerFactory initiates instance which is able to handle incoming dialogs

type Manager

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

Manager entrypoint which knows how to start pluggable Mysterium services

func NewManager

func NewManager(
	networkDefinition metadata.NetworkDefinition,
	identityLoader identity_selector.Loader,
	signerFactory identity.SignerFactory,
	identityRegistry identity_registry.IdentityRegistry,
	service Service,
	dialogHandlerFactory DialogHandlerFactory,
	discoveryService *discovery.Discovery,
) *Manager

NewManager creates new instance of pluggable services manager

func (*Manager) Kill

func (manager *Manager) Kill() error

Kill stops service

func (*Manager) Start

func (manager *Manager) Start() (err error)

Start starts service - does not block

func (*Manager) Wait

func (manager *Manager) Wait() error

Wait blocks until service is stopped

type Options

type Options struct {
	Identity   string
	Passphrase string

	OpenvpnProtocol string
	OpenvpnPort     int
}

Options describes options which are required to start a service

type Service

type Service interface {
	Start(providerID identity.Identity) (dto_discovery.ServiceProposal, session.ConfigProvider, error)
	Wait() error
	Stop() error
}

Service interface represents pluggable Mysterium service

Jump to

Keyboard shortcuts

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