diff options
Diffstat (limited to 'lulu.go')
| -rw-r--r-- | lulu.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -54,7 +54,8 @@ func ApiKeyPage() string { } type Client struct { - c *http.Client + ctx context.Context + c *http.Client } // NewClient returns a client that will use the given client-key and @@ -70,9 +71,12 @@ func NewClient(ctx context.Context, key, secret string) (*Client, error) { ClientSecret: secret, TokenURL: tokenUrl, } - return &Client{cfg.Client(ctx)}, nil + return &Client{ctx, cfg.Client(ctx)}, nil } +// Context returns the client's context. +func (c *Client) Context() context.Context { return c.ctx } + // ValidateInterior starts a server-side validation job for the given // interior file and polls its status until it finishes or the context // expires. See also: StartInteriorValidation() and |