Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flesh out client tests #252

Merged
merged 13 commits into from
Oct 23, 2024
21 changes: 0 additions & 21 deletions .github/workflows/build.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions v1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ import (
//
// Clients are backed by a gRPC client and as such are thread-safe.
type Client struct {
// Provide a handle on the underlying connection to enable cleanup
// behaviors (among others)
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 All @@ -34,6 +41,7 @@ func NewClient(endpoint string, opts ...grpc.DialOption) (*Client, error) {
}

return &Client{
conn,
v1.NewSchemaServiceClient(conn),
v1.NewPermissionsServiceClient(conn),
v1.NewWatchServiceClient(conn),
Expand All @@ -50,6 +58,7 @@ func NewClientWithExperimentalAPIs(endpoint string, opts ...grpc.DialOption) (*C

return &ClientWithExperimental{
Client{
conn,
v1.NewSchemaServiceClient(conn),
v1.NewPermissionsServiceClient(conn),
v1.NewWatchServiceClient(conn),
Expand Down
Loading
Loading