# README
Go-task-driver
task driver for golang
Quick start
package task_driver
import (
"fmt"
"time"
)
func ExampleDriverType_Register() {
driver := NewTaskDriver()
driver.Register(&Test{})
driver.RunWait()
// Output:
// a
// [INFO] [test]: stopping...
// haha
// xixi
// [INFO] [test]: stopped
}
type Test struct {
}
func (s *Test) GetName() string {
return "test"
}
func (t *Test) Stop() error {
fmt.Println("haha")
time.Sleep(2 * time.Second)
fmt.Println("xixi")
return nil
}
func (t *Test) Run() error {
fmt.Println(`a`)
return nil
}
Document
Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
License
This project is licensed under the Apache License.
# Functions
No description provided by the author
# Structs
No description provided by the author
# Interfaces
No description provided by the author