Explorar o código

added service registration

Shelikhoo %!s(int64=4) %!d(string=hai) anos
pai
achega
13f05c1b9d
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      app/restful-api/config.go

+ 12 - 0
app/restful-api/config.go

@@ -0,0 +1,12 @@
+package restful_api
+
+import (
+	"context"
+	"github.com/v2fly/v2ray-core/v4/common"
+)
+
+func init() {
+	common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
+		return newRestfulService(ctx, config.(*Config))
+	}))
+}