2022-06-11 01:34:30 +00:00
|
|
|
package portforward
|
|
|
|
|
|
2023-09-23 12:57:12 +02:00
|
|
|
import "context"
|
|
|
|
|
|
|
|
|
|
type Service interface {
|
|
|
|
|
Start(ctx context.Context) (runError <-chan error, err error)
|
|
|
|
|
Stop() (err error)
|
|
|
|
|
GetPortForwarded() (port uint16)
|
|
|
|
|
}
|
2022-06-11 01:34:30 +00:00
|
|
|
|
|
|
|
|
type PortAllower interface {
|
|
|
|
|
SetAllowedPort(ctx context.Context, port uint16, intf string) (err error)
|
|
|
|
|
RemoveAllowedPort(ctx context.Context, port uint16) (err error)
|
|
|
|
|
}
|
2023-09-23 12:57:12 +02:00
|
|
|
|
|
|
|
|
type Logger interface {
|
|
|
|
|
Info(s string)
|
|
|
|
|
Warn(s string)
|
|
|
|
|
Error(s string)
|
|
|
|
|
}
|