@@ -23,9 +23,10 @@ import (
|
||||
)
|
||||
|
||||
type clientOpts struct {
|
||||
defaultns string
|
||||
services *services
|
||||
dialOptions []grpc.DialOption
|
||||
defaultns string
|
||||
defaultRuntime string
|
||||
services *services
|
||||
dialOptions []grpc.DialOption
|
||||
}
|
||||
|
||||
// ClientOpt allows callers to set options on the containerd client
|
||||
@@ -42,6 +43,14 @@ func WithDefaultNamespace(ns string) ClientOpt {
|
||||
}
|
||||
}
|
||||
|
||||
// WithDefaultRuntime sets the default runtime on the client
|
||||
func WithDefaultRuntime(rt string) ClientOpt {
|
||||
return func(c *clientOpts) error {
|
||||
c.defaultRuntime = rt
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithDialOpts allows grpc.DialOptions to be set on the connection
|
||||
func WithDialOpts(opts []grpc.DialOption) ClientOpt {
|
||||
return func(c *clientOpts) error {
|
||||
|
||||
Reference in New Issue
Block a user