Skip to content

Commit f855e27

Browse files
authored
Merge pull request #19 from bugout-dev/manual-client
Manual clients creation
2 parents 887594b + 794f587 commit f855e27

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

pkg/client.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package bugout
22

33
import (
4+
"time"
5+
46
"github.com/bugout-dev/bugout-go/pkg/brood"
57
"github.com/bugout-dev/bugout-go/pkg/spire"
68
)
@@ -10,6 +12,16 @@ type BugoutClient struct {
1012
Spire spire.SpireCaller
1113
}
1214

15+
func ClientBrood(broodURL string, timeout time.Duration) BugoutClient {
16+
broodClient := brood.NewClient(broodURL, timeout)
17+
return BugoutClient{Brood: broodClient}
18+
}
19+
20+
func ClientSpire(spireURL string, timeout time.Duration) BugoutClient {
21+
spireClient := spire.NewClient(spireURL, timeout)
22+
return BugoutClient{Spire: spireClient}
23+
}
24+
1325
func ClientFromEnv() (BugoutClient, error) {
1426
broodClient, err := brood.ClientFromEnv()
1527
if err != nil {

pkg/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package bugout
22

3-
const Version string = "0.4.2"
3+
const Version string = "0.4.3"

0 commit comments

Comments
 (0)