mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
update
add conditional compilation support add multi core support
This commit is contained in:
22
core/interface.go
Normal file
22
core/interface.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
)
|
||||
|
||||
type AddUsersParams struct {
|
||||
Tag string
|
||||
Config *conf.ControllerConfig
|
||||
UserInfo []panel.UserInfo
|
||||
NodeInfo *panel.NodeInfo
|
||||
}
|
||||
type Core interface {
|
||||
Start() error
|
||||
Close() error
|
||||
AddNode(tag string, info *panel.NodeInfo, config *conf.ControllerConfig) error
|
||||
DelNode(tag string) error
|
||||
AddUsers(p *AddUsersParams) (added int, err error)
|
||||
GetUserTraffic(email string, reset bool) (up int64, down int64)
|
||||
DelUsers(users []string, tag string) error
|
||||
}
|
||||
Reference in New Issue
Block a user