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

Method Version

client/client.go:145–158  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

143}
144
145func (c client) Version(ctx context.Context) (DaemonVersion, error) {
146 resp, err := c.versionClient.GetVersion(ctx, connect.NewRequest(healthv1.GetVersionRequest_builder{}.Build()))
147 if isDialError(err) {
148 return DaemonVersion{}, fmt.Errorf("%w: %w", ErrSecretsEngineNotAvailable, err)
149 }
150 if err != nil {
151 return DaemonVersion{}, err
152 }
153 ver, err := api.NewVersion(resp.Msg.GetVersion())
154 if err != nil {
155 return DaemonVersion{}, fmt.Errorf("parsing daemon version %q: %w", resp.Msg.GetVersion(), err)
156 }
157 return DaemonVersion{Version: ver, Date: resp.Msg.GetDate(), CommitHash: resp.Msg.GetCommitHash()}, nil
158}
159
160// Client is the interface for interacting with the secrets engine daemon.
161type Client interface {

Callers

nothing calls this directly

Calls 6

isDialErrorFunction · 0.85
GetDateMethod · 0.80
GetCommitHashMethod · 0.80
GetVersionMethod · 0.65
ErrorfMethod · 0.65
BuildMethod · 0.45

Tested by

no test coverage detected