From 421c607c548409bd05d3df016cc2fd8150131d99 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 24 Aug 2017 11:10:01 -0400 Subject: [PATCH] Add Events client method Fixes #1381 Signed-off-by: Michael Crosby --- client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client.go b/client.go index 65c28b8b3..bc46f8632 100644 --- a/client.go +++ b/client.go @@ -353,6 +353,13 @@ func (c *Client) ListImages(ctx context.Context) ([]Image, error) { return images, nil } +// Events returns an event subscription for the provided filters +func (c *Client) Events(ctx context.Context, filters ...string) (eventsapi.Events_SubscribeClient, error) { + return c.EventService().Subscribe(ctx, &eventsapi.SubscribeRequest{ + Filters: filters, + }) +} + // Close closes the clients connection to containerd func (c *Client) Close() error { return c.conn.Close()