Skip to content

Commit

Permalink
register http errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Bai-Yingjie committed Dec 25, 2021
1 parent 4fd4fba commit 0062b49
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gshellbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 12 additions & 0 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ package gshellos
import (
"fmt"
"io"
"net"
"net/http"
"os"
"syscall"

as "github.com/godevsig/adaptiveservice"
)

func init() {
Expand All @@ -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))
}

0 comments on commit 0062b49

Please sign in to comment.