diff --git a/docs/daemon.md b/docs/daemon.md index 456afea..e45535a 100644 --- a/docs/daemon.md +++ b/docs/daemon.md @@ -164,7 +164,7 @@ and a http file service should be running, this is done by starting a gshell app ```shell cd /path/to/gshell -bin/gshell run app-http/fileserver/fileserver.go -dir /path/to/gshell/release +bin/gshell run util/fileserver/cmd/fileserver.go -dir /path/contains/gshell/release ``` ### Disable auto update diff --git a/gshellbuilder.go b/gshellbuilder.go index 5e53d56..6d6e268 100644 --- a/gshellbuilder.go +++ b/gshellbuilder.go @@ -864,7 +864,7 @@ func ShellMain() error { gshellos is a simple pure golang service framework for linux devices. One gshell daemon must have been started in the system to join the service network with an unique provider ID. - Each app/service is run in one dedicated GRE(Gshell Runtime Environment) + Each app/service runs in one dedicated GRE(Gshell Runtime Environment) which by default runs in a random GRG(Gshell Runtime Group). GREs can be grouped into one named GRG for better performance. gshell enters interactive mode if no options and no commands provided. diff --git a/http.go b/http.go index 9d72561..344e65d 100644 --- a/http.go +++ b/http.go @@ -5,7 +5,12 @@ package gshellos import ( "fmt" "io" + "net" "net/http" + "os" + "syscall" + + as "github.com/godevsig/adaptiveservice" ) func init() { @@ -29,3 +34,10 @@ func httpGetFunc(url string) ([]byte, error) { return body, nil } + +func init() { + as.RegisterType((*net.OpError)(nil)) + as.RegisterType((*net.TCPAddr)(nil)) + as.RegisterType((*os.SyscallError)(nil)) + as.RegisterType(syscall.Errno(0)) +}