rewrite error lib

This commit is contained in:
Darien Raymond committed 2016-12-04 09:10:47 +01:00
1 parent a4019a6900
commit efb24a4d21
65 files changed
+251 -132

No files matched your search

+1 -1
View File
@@ -1,11 +1,11 @@
package impl
import (
"errors"
"v2ray.com/core/app"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/app/router"
"v2ray.com/core/common/alloc"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/proxy"
+1 -1
View File
@@ -1,13 +1,13 @@
package dns
import (
"errors"
"net"
"sync"
"time"
"v2ray.com/core/app"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/loader"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
+1 -1
View File
@@ -1,13 +1,13 @@
package proxy
import (
"errors"
"io"
"net"
"time"
"v2ray.com/core/app"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common/errors"
v2io "v2ray.com/core/common/io"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
+1 -1
View File
@@ -1,9 +1,9 @@
package router
import (
"errors"
"net"
"v2ray.com/core/common/errors"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/proxy"
)
+1 -2
View File
@@ -1,10 +1,9 @@
package router
import (
"errors"
"v2ray.com/core/app"
"v2ray.com/core/app/dns"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/loader"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
+2 -3
View File
@@ -1,9 +1,8 @@
package app
import (
"errors"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
)
type ID int
@@ -94,7 +93,7 @@ func (v *spaceImpl) BindApp(id ID, application Application) {
func (v *spaceImpl) BindFromConfig(name string, config interface{}) error {
factory, found := applicationFactoryCache[name]
if !found {
return errors.New("Space: app not registered: " + name)
return errors.New("Space: app not registered: ", name)
}
app, err := factory.Create(v, config)
if err != nil {
+29
View File
@@ -0,0 +1,29 @@
syntax = "proto3";
package v2ray.core.app.web;
option go_package = "web";
option java_package = "com.v2ray.core.app.web";
option java_outer_classname = "ConfigProto";
import "v2ray.com/core/common/loader/type.proto";
message FileServer {
message Entry {
oneof FileOrDir {
string File = 1;
string Directory = 2;
}
string path = 3;
}
repeated Entry entry = 1;
}
message Server {
repeated string domain = 1;
v2ray.core.common.loader.TypedSettings settings = 2;
}
message Config {
repeated Server server = 1;
}
+1
View File
@@ -0,0 +1 @@
package web
+15
View File
@@ -0,0 +1,15 @@
package web
import (
"v2ray.com/core/app"
"v2ray.com/core/common"
)
const (
APP_ID = app.ID(8)
)
type Server interface {
common.Releasable
Handle()
}