mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-18 18:43:37 +03:00
21 lines
353 B
Go
21 lines
353 B
Go
package daemon
|
|
|
|
import "github.com/kardianos/service"
|
|
|
|
type Interface struct {
|
|
server *Server
|
|
}
|
|
|
|
func NewInterface(options Options) *Interface {
|
|
return &Interface{NewServer(options)}
|
|
}
|
|
|
|
func (d *Interface) Start(_ service.Service) error {
|
|
return d.server.Start()
|
|
}
|
|
|
|
func (d *Interface) Stop(_ service.Service) error {
|
|
d.server.Close()
|
|
return nil
|
|
}
|