Skip to content

Commit

Permalink
chore(simple_client): Add explicit ServiceUnavailable error type - br…
Browse files Browse the repository at this point in the history
…ing back constructor
  • Loading branch information
EthenNotEthan committed Dec 3, 2024
1 parent d5f1145 commit 2167732
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ type SimpleCommitmentClient struct {
httpClient *http.Client
}

func New(cfg *Config) *SimpleCommitmentClient {
return &SimpleCommitmentClient{
cfg,
http.DefaultClient,
}
}

// Health indicates if the server is operational; useful for event based awaits
// when integration testing
func (c *SimpleCommitmentClient) Health() error {
Expand Down

0 comments on commit 2167732

Please sign in to comment.