method for closing of gRPC connection (#155)

This commit is contained in:
Darrian 2018-11-14 14:32:03 +00:00 committed by Jess Frazelle
parent 67d1af130d
commit 3033420c34

View file

@ -81,6 +81,11 @@ func New(url string, opt Opt) (*Clair, error) {
return registry, nil
}
// Close closes the gRPC connection
func (c *Clair) Close() error {
return c.grpcConn.Close()
}
// url returns a clair URL with the passed arguements concatenated.
func (c *Clair) url(pathTemplate string, args ...interface{}) string {
pathSuffix := fmt.Sprintf(pathTemplate, args...)