MCPcopy Create free account
hub / github.com/docker/secrets-engine / WithSocketPath

Function WithSocketPath

client/client.go:58–69  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

56type Option func(c *config) error
57
58func WithSocketPath(path string) Option {
59 return func(s *config) error {
60 if path == "" {
61 return errors.New("no path provided")
62 }
63 if s.dialContext != nil {
64 return errors.New("cannot set socket path and dial")
65 }
66 s.dialContext = dialFromPath(path)
67 return nil
68 }
69}
70
71func WithDialContext(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) Option {
72 return func(s *config) error {

Callers 3

Test_ListPluginsFunction · 0.85
Test_VersionFunction · 0.85

Calls 1

dialFromPathFunction · 0.85

Tested by 3

Test_ListPluginsFunction · 0.68
Test_VersionFunction · 0.68