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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager represents entrypoint for Openvpn service with top level components

func NewManager

func NewManager(
	nodeOptions node.Options,
	serviceOptions service.Options,
	ipResolver ip.Resolver,
	locationResolver location.Resolver,
	sessionMap openvpn_session.SessionMap,
) *Manager

NewManager creates new instance of Openvpn service

func (*Manager) Start

func (manager *Manager) Start(providerID identity.Identity) (
	proposal dto_discovery.ServiceProposal,
	sessionConfigProvider session.ConfigProvider,
	err error,
)

Start starts service - does not block

func (*Manager) Stop

func (manager *Manager) Stop() error

Stop stops service

func (*Manager) Wait

func (manager *Manager) Wait() error

Wait blocks until service is stopped

type ProposalFactory

type ProposalFactory func(currentLocation dto_discovery.Location) dto_discovery.ServiceProposal

ProposalFactory prepares service proposal during runtime

type ServerConfigFactory

type ServerConfigFactory func(*tls.Primitives) *openvpn_service.ServerConfig

ServerConfigFactory callback generates session config for remote client

type ServerFactory

type ServerFactory func(*openvpn_service.ServerConfig) openvpn.Process

ServerFactory initiates Openvpn server instance during runtime

type SessionConfigProviderFactory

type SessionConfigProviderFactory func(secPrimitives *tls.Primitives, outboundIP, publicIP string) session.ConfigProvider

SessionConfigProviderFactory initiates ConfigProvider instance during runtime

Jump to

Keyboard shortcuts

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