Skip to content

Commit ccecb66

Browse files
authored
client: Expose close function (#311)
1 parent 91238f3 commit ccecb66

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

client/client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ type Client interface {
3838
*gethrpc.ClientSubscription, error)
3939

4040
URL() string
41+
42+
Close()
4143
}
4244

4345
type client struct {
@@ -51,6 +53,10 @@ func (c client) URL() string {
5153
return c.url
5254
}
5355

56+
func (c client) Close() {
57+
c.Client.Close()
58+
}
59+
5460
// Connect connects to the provided url
5561
func Connect(url string) (Client, error) {
5662
log.Printf("Connecting to %v...", url)

client/mocks/Client.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)