Skip to content

Commit

Permalink
Make client private
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat15 committed Oct 23, 2024
1 parent b1edb93 commit 27500c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion v1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ import (
type Client struct {
// Provide a handle on the underlying connection to enable cleanup
// behaviors (among others)
Conn *grpc.ClientConn
conn *grpc.ClientConn
v1.SchemaServiceClient
v1.PermissionsServiceClient
v1.WatchServiceClient
}

func (c *Client) Close() error {
return c.conn.Close()
}

// ClientWithExperimental represents and open connection to Authzed with
// experimental services available.
//
Expand Down
2 changes: 1 addition & 1 deletion v1/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func testClient(t *testing.T) *authzed.Client {
grpcutil.WithInsecureBearerToken(token),
)
require.NoError(t, err)
t.Cleanup(func() { require.NoError(t, client.Conn.Close()) })
t.Cleanup(func() { require.NoError(t, client.Close()) })
return client
}

Expand Down

0 comments on commit 27500c0

Please sign in to comment.