github.com/imannamdari/v2ray-core/v5@v5.0.5/features/extension/instance.go (about)

     1  package extension
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/imannamdari/v2ray-core/v5/features"
     7  )
     8  
     9  // InstanceManagement : unstable
    10  type InstanceManagement interface {
    11  	features.Feature
    12  	ListInstance(ctx context.Context) ([]string, error)
    13  	AddInstance(ctx context.Context, name string, config []byte, configType string) error
    14  	StartInstance(ctx context.Context, name string) error
    15  	StopInstance(ctx context.Context, name string) error
    16  	UntrackInstance(ctx context.Context, name string) error
    17  }
    18  
    19  func InstanceManagementType() interface{} {
    20  	return (*InstanceManagement)(nil)
    21  }