Skip to content

Commit bd425f1

Browse files
committed
Minor changes
1 parent 3518eba commit bd425f1

File tree

7 files changed

+3
-32
lines changed

7 files changed

+3
-32
lines changed

README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,3 @@ Then create a client, providing the address of the running box.
2323
```go
2424
faceboxClient := facebox.New("http://localhost:8080")
2525
```
26-
27-
It is recommended that you consider the startup time a box needs before it
28-
is ready. The simplest approach is to use the `boxutil.WaitForReady` function:
29-
30-
```go
31-
err := boxutil.WaitForReady(ctx, faceboxClient)
32-
if err != nil {
33-
log.Fatalln("error waiting for box:", err)
34-
}
35-
```
36-
37-
A more advanced solution is to get notified whenever the status of a box changes
38-
using the `boxutil.StatusChan` feature:
39-
40-
```go
41-
go func(){
42-
statusChan := boxutil.StatusChan(ctx, faceboxClient)
43-
for {
44-
select {
45-
case status := <-statusChan:
46-
if !boxutil.IsReady(status) {
47-
log.Println("TODO: Pause work, the box isn't ready")
48-
} else {
49-
log.Println("TODO: resume work, the box is ready to go")
50-
}
51-
}
52-
}
53-
}()
54-
```

facebox/facebox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/url"
99
"time"
1010

11-
"github.com/machinebox/sdk-go/boxutil"
11+
"github.com/machinebox/sdk-go/x/boxutil"
1212
)
1313

1414
// Face represents a face in an image.

nudebox/nudebox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"net/url"
1111
"time"
1212

13-
"github.com/machinebox/sdk-go/boxutil"
13+
"github.com/machinebox/sdk-go/x/boxutil"
1414
"github.com/pkg/errors"
1515
)
1616

tagbox/tagbox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"net/url"
1111
"time"
1212

13-
"github.com/machinebox/sdk-go/boxutil"
13+
"github.com/machinebox/sdk-go/x/boxutil"
1414
"github.com/pkg/errors"
1515
)
1616

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)