The Client metadata of a specific client ID within the same session as the current client.
(ctx context.Context, clientID string)
| 1951 | // The Client metadata of a specific client ID within the same session as the |
| 1952 | // current client. |
| 1953 | func (srv *Server) SpecificClientMetadata(ctx context.Context, clientID string) (*engine.ClientMetadata, error) { |
| 1954 | client, err := srv.clientFromContext(ctx) |
| 1955 | if err != nil { |
| 1956 | return nil, err |
| 1957 | } |
| 1958 | clientMD, err := srv.clientFromIDs(client.daggerSession.sessionID, clientID) |
| 1959 | if err != nil { |
| 1960 | return nil, fmt.Errorf("failed to retrieve session main client: %w", err) |
| 1961 | } |
| 1962 | return clientMD.clientMetadata, nil |
| 1963 | } |
| 1964 | |
| 1965 | func (srv *Server) SpecificClientAttachableConn(ctx context.Context, clientID string, opts core.SpecificClientAttachableConnOpts) (*grpc.ClientConn, bool, error) { |
| 1966 | client, err := srv.clientFromContext(ctx) |
no test coverage detected