manager

package
v0.0.0-...-1ce0ccd Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPCClientQuit

func IPCClientQuit(stopTunnelsOnQuit bool) (bool, error)

func IPCClientUpdate

func IPCClientUpdate() error

func IPCServerListen

func IPCServerListen(reader *os.File, writer *os.File, events *os.File, elevatedToken windows.Token) error

func IPCServerNotifyManagerStopping

func IPCServerNotifyManagerStopping()

func IPCServerNotifyTunnelChange

func IPCServerNotifyTunnelChange(name string, state TunnelState, err error)

func IPCServerNotifyTunnelsChange

func IPCServerNotifyTunnelsChange()

func IPCServerNotifyUpdateFound

func IPCServerNotifyUpdateFound(state UpdateState)

func IPCServerNotifyUpdateProgress

func IPCServerNotifyUpdateProgress(dp updater.DownloadProgress)

func InitializeIPCClient

func InitializeIPCClient(reader *os.File, writer *os.File, events *os.File)

func InstallManager

func InstallManager() error

func InstallTunnel

func InstallTunnel(configPath string) error

func PipePathOfTunnel

func PipePathOfTunnel(tunnelName string) (string, error)

func RunManager

func RunManager() error

func RunTunnel

func RunTunnel(confPath string) error

func ServiceNameOfTunnel

func ServiceNameOfTunnel(tunnelName string) (string, error)

func UninstallManager

func UninstallManager() error

func UninstallTunnel

func UninstallTunnel(name string) error

Types

type ManagerService

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

func (*ManagerService) Create

func (s *ManagerService) Create(tunnelConfig conf.Config, tunnel *Tunnel) error

func (*ManagerService) Delete

func (s *ManagerService) Delete(tunnelName string, _ *uintptr) error

func (*ManagerService) GlobalState

func (s *ManagerService) GlobalState(_ uintptr, state *TunnelState) error

func (*ManagerService) Quit

func (s *ManagerService) Quit(stopTunnelsOnQuit bool, alreadyQuit *bool) error

func (*ManagerService) RuntimeConfig

func (s *ManagerService) RuntimeConfig(tunnelName string, config *conf.Config) error

func (*ManagerService) Start

func (s *ManagerService) Start(tunnelName string, unused *uintptr) error

func (*ManagerService) State

func (s *ManagerService) State(tunnelName string, state *TunnelState) error

func (*ManagerService) Stop

func (s *ManagerService) Stop(tunnelName string, _ *uintptr) error

func (*ManagerService) StoredConfig

func (s *ManagerService) StoredConfig(tunnelName string, config *conf.Config) error

func (*ManagerService) Tunnels

func (s *ManagerService) Tunnels(_ uintptr, tunnels *[]Tunnel) error

func (*ManagerService) Update

func (s *ManagerService) Update(_ uintptr, _ *uintptr) error

func (*ManagerService) UpdateState

func (s *ManagerService) UpdateState(_ uintptr, state *UpdateState) error

func (*ManagerService) WaitForStop

func (s *ManagerService) WaitForStop(tunnelName string, _ *uintptr) error

type ManagerStoppingCallback

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

func IPCClientRegisterManagerStopping

func IPCClientRegisterManagerStopping(cb func()) *ManagerStoppingCallback

func (*ManagerStoppingCallback) Unregister

func (cb *ManagerStoppingCallback) Unregister()

type NotificationType

type NotificationType int
const (
	TunnelChangeNotificationType NotificationType = iota
	TunnelsChangeNotificationType
	ManagerStoppingNotificationType
	UpdateFoundNotificationType
	UpdateProgressNotificationType
)

type Tunnel

type Tunnel struct {
	Name string
}

func IPCClientNewTunnel

func IPCClientNewTunnel(conf *conf.Config) (Tunnel, error)

func IPCClientTunnels

func IPCClientTunnels() ([]Tunnel, error)

func (*Tunnel) Delete

func (t *Tunnel) Delete() error

func (*Tunnel) RuntimeConfig

func (t *Tunnel) RuntimeConfig() (c conf.Config, err error)

func (*Tunnel) Start

func (t *Tunnel) Start() error

func (*Tunnel) State

func (t *Tunnel) State() (TunnelState, error)

func (*Tunnel) Stop

func (t *Tunnel) Stop() error

func (*Tunnel) StoredConfig

func (t *Tunnel) StoredConfig() (c conf.Config, err error)

func (*Tunnel) Toggle

func (t *Tunnel) Toggle() (oldState TunnelState, err error)

func (*Tunnel) WaitForStop

func (t *Tunnel) WaitForStop() error

type TunnelChangeCallback

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

func IPCClientRegisterTunnelChange

func IPCClientRegisterTunnelChange(cb func(tunnel *Tunnel, state TunnelState, globalState TunnelState, err error)) *TunnelChangeCallback

func (*TunnelChangeCallback) Unregister

func (cb *TunnelChangeCallback) Unregister()

type TunnelState

type TunnelState int
const (
	TunnelUnknown TunnelState = iota
	TunnelStarted
	TunnelStopped
	TunnelStarting
	TunnelStopping
)

func IPCClientGlobalState

func IPCClientGlobalState() (TunnelState, error)

type TunnelsChangeCallback

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

func IPCClientRegisterTunnelsChange

func IPCClientRegisterTunnelsChange(cb func()) *TunnelsChangeCallback

func (*TunnelsChangeCallback) Unregister

func (cb *TunnelsChangeCallback) Unregister()

type UpdateFoundCallback

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

func IPCClientRegisterUpdateFound

func IPCClientRegisterUpdateFound(cb func(updateState UpdateState)) *UpdateFoundCallback

func (*UpdateFoundCallback) Unregister

func (cb *UpdateFoundCallback) Unregister()

type UpdateProgressCallback

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

func IPCClientRegisterUpdateProgress

func IPCClientRegisterUpdateProgress(cb func(dp updater.DownloadProgress)) *UpdateProgressCallback

func (*UpdateProgressCallback) Unregister

func (cb *UpdateProgressCallback) Unregister()

type UpdateState

type UpdateState uint32
const (
	UpdateStateUnknown UpdateState = iota
	UpdateStateFoundUpdate
	UpdateStateUpdatesDisabledUnofficialBuild
)

func IPCClientUpdateState

func IPCClientUpdateState() (UpdateState, error)

Jump to

Keyboard shortcuts

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