2023-11-17 20:39:00 +03:00
|
|
|
package iface
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/Neur0toxine/sshpoke/internal/config"
|
2023-11-18 12:36:17 +03:00
|
|
|
"github.com/Neur0toxine/sshpoke/pkg/dto"
|
2023-11-17 20:39:00 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type DriverConstructor func(ctx context.Context, name string, params config.DriverParams) (Driver, error)
|
|
|
|
|
|
|
|
type Driver interface {
|
2023-11-18 12:36:17 +03:00
|
|
|
Name() string
|
|
|
|
Handle(event dto.Event) error
|
2023-11-17 20:39:00 +03:00
|
|
|
Driver() config.DriverType
|
|
|
|
WaitForShutdown()
|
|
|
|
}
|