Skip to content

Commit

Permalink
add context to windows functions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldwan committed Aug 13, 2021
1 parent 6c53a71 commit 6b18e6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/agent/client_noagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (c *Client) Ping() (int, error) {
return 0, nil
}

func (c *Client) Establish(slug string) error {
func (c *Client) Establish(ctx context.Context, slug string) error {
if c.Client == nil {
return fmt.Errorf("no client set for stub agent")
}
Expand All @@ -79,7 +79,7 @@ func (c *Client) Establish(slug string) error {
return nil
}

func (c *Client) Probe(o *api.Organization) error {
func (c *Client) Probe(ctx context.Context, o *api.Organization) error {
tunnel, err := c.tunnelFor(o.Slug)
if err != nil {
return fmt.Errorf("probe: can't build tunnel: %s", err)
Expand All @@ -92,7 +92,7 @@ func (c *Client) Probe(o *api.Organization) error {
return nil
}

func (c *Client) Instances(o *api.Organization, app string) (*Instances, error) {
func (c *Client) Instances(ctx context.Context, o *api.Organization, app string) (*Instances, error) {
tunnel, err := c.tunnelFor(o.Slug)
if err != nil {
return nil, fmt.Errorf("can't build tunnel: %s", err)
Expand All @@ -115,7 +115,7 @@ type Dialer struct {
tunnel *wg.Tunnel
}

func (c *Client) Dialer(o *api.Organization) (*Dialer, error) {
func (c *Client) Dialer(ctx context.Context, o *api.Organization) (*Dialer, error) {
if err := c.Establish(o.Slug); err != nil {
return nil, fmt.Errorf("dial: can't establish tunel: %s", err)
}
Expand Down

0 comments on commit 6b18e6d

Please sign in to comment.