pusher

package
v0.0.0-...-cb3ca1d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PushConfig

func PushConfig(ctx context.Context, c *Collect) error

PushConfig send the OpenVpn configuration to Session server.

Types

type Collect

type Collect struct {
	Config   *Config
	Server   *srv.Config
	Username string
	Password string
	Logger   *util.Logger
}

Collect collects the required parameters.

func NewCollect

func NewCollect(conf *Config, srv *srv.Config, user, pass string,
	logger *util.Logger) *Collect

NewCollect for create new Collect object.

type Config

type Config struct {
	ExportConfigKeys []string
	ConfigPath       string
	CaCertPath       string
	Pushed           bool
	TimeOut          int64
}

Config for pushing OpenVpn configuration. ExportConfigKeys - list of parameters that are exported to the OpenVpn client configuration from the OpenVpn server configuration. ConfigPath - absolute path to OpenVpn server configuration file. CaCertPath - absolute path to Ca certificate file Pushed - if the configuration is passed to the Session server then this parameter is true. TimeOut - pause between attempts to send a configuration to the Session server.

func NewConfig

func NewConfig() *Config

NewConfig for create empty config.

Jump to

Keyboard shortcuts

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