Skip to content

Commit

Permalink
refactor: reverted back original NewCLientOrDie
Browse files Browse the repository at this point in the history
Signed-off-by: Soumya Ghosh Dastidar <soumya@akuity.io>
  • Loading branch information
gdsoumya committed Feb 10, 2022
1 parent 62937ca commit 2db0076
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/apiclient/apiclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,15 @@ func (c *client) redeemRefreshToken() (string, string, error) {
return rawIDToken, refreshToken, nil
}

// NewClientOrDie creates a new API client from a set of config options, or fails fatally if the new client creation fails.
func NewClientOrDie(opts *ClientOptions) Client {
client, err := NewClient(opts)
if err != nil {
log.Fatal(err)
}
return client
}

// JwtCredentials implements the gRPC credentials.Credentials interface which we is used to do
// grpc.WithPerRPCCredentials(), for authentication
type jwtCredentials struct {
Expand Down

0 comments on commit 2db0076

Please sign in to comment.