2021-06-28 15:58:56 -04:00
|
|
|
package extension
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-10-28 06:34:19 -04:00
|
|
|
|
2022-01-02 10:16:23 -05:00
|
|
|
"github.com/v2fly/v2ray-core/v5/features"
|
2021-06-28 15:58:56 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// InstanceManagement : unstable
|
|
|
|
type InstanceManagement interface {
|
|
|
|
features.Feature
|
|
|
|
ListInstance(ctx context.Context) ([]string, error)
|
|
|
|
AddInstance(ctx context.Context, name string, config []byte, configType string) error
|
|
|
|
StartInstance(ctx context.Context, name string) error
|
|
|
|
StopInstance(ctx context.Context, name string) error
|
|
|
|
UntrackInstance(ctx context.Context, name string) error
|
|
|
|
}
|
|
|
|
|
|
|
|
func InstanceManagementType() interface{} {
|
|
|
|
return (*InstanceManagement)(nil)
|
|
|
|
}
|