github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/features/feature.go (about)

     1  package features
     2  
     3  import "github.com/v2fly/v2ray-core/v5/common"
     4  
     5  //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
     6  
     7  // Feature is the interface for V2Ray features. All features must implement this interface.
     8  // All existing features have an implementation in app directory. These features can be replaced by third-party ones.
     9  type Feature interface {
    10  	common.HasType
    11  	common.Runnable
    12  }
    13  
    14  // PrintDeprecatedFeatureWarning prints a warning for deprecated feature.
    15  func PrintDeprecatedFeatureWarning(feature string) {
    16  	newError("You are using a deprecated feature: " + feature + ". Please update your config file with latest configuration format, or update your client software.").WriteToLog()
    17  }
    18  
    19  // TaggedFeatures unstable
    20  type TaggedFeatures interface {
    21  	GetFeaturesByTag(tag string) (Feature, error)
    22  	common.Runnable
    23  }