Browse Source

added service registration

Shelikhoo 4 years ago
parent
commit
13f05c1b9d
1 changed files with 12 additions and 0 deletions
  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))
+	}))
+}