Merge pull request #1423 from crosbymichael/events

Add Events client method
This commit is contained in:
Derek McGowan
2017-08-25 11:45:55 -07:00
committed by GitHub

View File

@@ -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()