NewClient constructs a new application_snapshot_image with the default client.
(ctx context.Context, opts ...remote.Option)
| 91 | |
| 92 | // NewClient constructs a new application_snapshot_image with the default client. |
| 93 | func NewClient(ctx context.Context, opts ...remote.Option) Client { |
| 94 | client, ok := ctx.Value(clientContextKey).(Client) |
| 95 | if ok && client != nil { |
| 96 | return client |
| 97 | } |
| 98 | |
| 99 | o := opts |
| 100 | if len(opts) == 0 { |
| 101 | o = CreateRemoteOptions(ctx) |
| 102 | } |
| 103 | |
| 104 | return &defaultClient{ctx, o} |
| 105 | } |
| 106 | |
| 107 | type defaultClient struct { |
| 108 | ctx context.Context |
no test coverage detected