internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanStart

func CanStart() bool

Types

type Port

type Port interface {
	API() Worker
	Error() error
	Done() <-chan struct{}
	Name() string
}

type Spawner

type Spawner interface {
	Spawn(network string, done chan struct{}) (Port, error)
}

type Worker

type Worker interface {
	Kill(ctx context.Context) (bool, error)
	Peers(ctx context.Context) ([]string, error)
}

We can't control launched tincd daemon after start. After privilege escalation (*sudo, oascript, runas, ...) we have no more control to the process:

* impossible send signal (to rooted process) * impossible control by STDIN/STDOUT due to privilege escalation apps are non-redirecting pipes

So we have to control by TCP, however we can detect death by exit

```

Desktop application
        |
        |
        |     worker for network (separate process due to privilege escalation)
        +.......+
        |       |
        |       |
  Peers +<----->|
        |       |
  Kill  +------>|
        |

```

Directories

Path Synopsis
Code generated by jsonrpc2.
Code generated by jsonrpc2.

Jump to

Keyboard shortcuts

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